Package org.jdesktop.swingx.decorator

Examples of org.jdesktop.swingx.decorator.Highlighter


                return CalendarState.DAY_OF_WEEK == ca.getCalendarState() ||
                    CalendarState.TITLE == ca.getCalendarState();
            }
           
        };
        Highlighter font = new AbstractHighlighter(boldPredicate) {

            @Override
            protected Component doHighlight(Component component,
                    ComponentAdapter adapter) {
                component.setFont(getDerivedFont(component.getFont()));
                return component;
            }
           
        };
        highlighter.addHighlighter(font);
       
        HighlightPredicate unselectable = new HighlightPredicate() {

            public boolean isHighlighted(Component renderer,
                    ComponentAdapter adapter) {
                if (!(adapter instanceof CalendarAdapter))
                    return false;
                return ((CalendarAdapter) adapter).isUnselectable();
            }
           
        };
        textCross.setForeground(unselectableDayForeground);
        Highlighter painterHL = new PainterHighlighter(unselectable, textCross);
        highlighter.addHighlighter(painterHL);
       
    }
View Full Code Here


        // new style: use highlighter for color config
        handler.addHighlighters(new ColorHighlighter(
                new DayOfWeekHighlightPredicate(Calendar.SATURDAY),
                null, Color.BLUE));
        // highlight property is setting opacity to true
        Highlighter transparent = new AbstractHighlighter(MonthViewExtDemoUtils.SELECTED) {
           
            @Override
            public Component highlight(Component component,
                    ComponentAdapter adapter) {
                // opacity is not one of the properties which are
View Full Code Here

        configureTitle(columnExt);
        ComponentProvider<?> provider = getComponentProvider(columnExt.getIdentifier());
        if (provider != null) {
            columnExt.setCellRenderer(new DefaultTableRenderer(provider));
        }
        Highlighter highlighter = getHighlighter(columnExt.getIdentifier());
        if (highlighter != null) {
            columnExt.setHighlighters(highlighter);
        }
        columnExt.setComparator(getComparator(columnExt.getIdentifier()));
        columnExt.setPrototypeValue(getPrototypeValue(columnExt.getIdentifier()));
View Full Code Here

        treeTable.setRowSelectionAllowed(true);
        treeTable.setCellSelectionEnabled(true);

        // Set the color of the cells.
        Color col = new Color(230, 230, 250);
        Highlighter myHighlighter = HighlighterFactory.createSimpleStriping(col);
        treeTable.setHighlighters(myHighlighter);

        Icon icon = icons.getIcon("samples.sampleIcon");
        treeTable.setLeafIcon(icon);
View Full Code Here

    treeTable.setRowSelectionAllowed(true);
    treeTable.setCellSelectionEnabled(true);

    // Set the color of the cells.
    Color col = new Color(230, 230, 250);
    Highlighter myHighlighter = HighlighterFactory
        .createSimpleStriping(col);
    treeTable.setHighlighters(myHighlighter);

    Icon icon = icons.getIcon("samples.sampleIcon");
    treeTable.setLeafIcon(icon);
View Full Code Here

          return false;
        }
        return (adapter.getValueAt(adapter.row,adapter.column) == null);
      }
    };
    Highlighter rateHighlighter = new  ColorHighlighter(ratePredicate, null, Color.LIGHT_GRAY);
    setHighlighters(rateHighlighter);
   
    getColumnModel().getColumn(TimesheetTableModel.Columns.DURATION.ordinal()).setCellEditor(new NumberEditor());
    getColumnModel().getColumn(TimesheetTableModel.Columns.RATE.ordinal()).setCellEditor(new NumberEditor());
    }
View Full Code Here

TOP

Related Classes of org.jdesktop.swingx.decorator.Highlighter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.