Java Code Examples for org.netbeans.api.visual.widget.Widget#setForeground()

The following examples show how to use org.netbeans.api.visual.widget.Widget#setForeground() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DBColorScheme.java    From jeddict with Apache License 2.0 6 votes vote down vote up
@Override
public void installUI(IPNodeWidget widget) {
    widget.setBorder(WIDGET_BORDER);
    Widget header = widget.getHeader();
    Rectangle bound = widget.getHeader().getBounds();
    if (bound == null) {
        bound = HEADER_BOUND;
    }
    GradientPaint gp = new GradientPaint(bound.x + bound.width / 2, bound.y, WIDGET_LBACKGROUND, bound.x + bound.width / 2, bound.y + bound.height, WIDGET_BACKGROUND);
    header.setBackground(gp);
    header.setBorder(OPAQUE_BORDER);
    widget.getHeader().setOpaque(true);
    widget.getNodeNameWidget().setForeground(Color.WHITE);
    Font font = widget.getNodeNameWidget().getFont()!=null?widget.getNodeNameWidget().getFont():widget.getScene().getDefaultFont();
    widget.getNodeNameWidget().setFont(font.deriveFont(Font.BOLD, 12));
    Widget pinsSeparator = widget.getPinsSeparator();
    pinsSeparator.setForeground(PIN_SEPERATOR_WIDGET_BACKGROUND);
    widget.getMinimizeButton().setImage(this.getMinimizeWidgetImage(widget));
}
 
Example 2
Source File: GraphColorScheme.java    From Llunatic with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void installUI(VMDNodeWidget widget) {
    widget.setBorder(VMDFactory.createVMDNodeBorder());
    widget.setOpaque(false);
    
    Widget header = widget.getHeader();
    header.setBorder(HEADER_BORDER_PIN);
    header.setBackground(COLOR_SELECTED);
    header.setOpaque(false);
    
    Widget minimize = widget.getMinimizeButton();
    minimize.setBorder(BORDER_MINIMIZE);
    
    Widget pinsSeparator = widget.getPinsSeparator();
    pinsSeparator.setForeground(BORDER_CATEGORY_BACKGROUND);
}
 
Example 3
Source File: ControlFlowScene.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public Widget createSelectionWidget() {
    Widget widget = new Widget(this);
    widget.setOpaque(false);
    widget.setBorder(BorderFactory.createLineBorder(Color.black, 2));
    widget.setForeground(Color.red);
    return widget;
}
 
Example 4
Source File: ControlFlowScene.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public Widget createSelectionWidget() {
    Widget widget = new Widget(this);
    widget.setOpaque(false);
    widget.setBorder(BorderFactory.createLineBorder(Color.black, 2));
    widget.setForeground(Color.red);
    return widget;
}
 
Example 5
Source File: ControlFlowScene.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public Widget createSelectionWidget() {
    Widget widget = new Widget(this);
    widget.setOpaque(false);
    widget.setBorder(BorderFactory.createLineBorder(Color.black, 2));
    widget.setForeground(Color.red);
    return widget;
}
 
Example 6
Source File: VMDOriginalColorScheme.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public void installUI (VMDNodeWidget widget) {
    widget.setBorder (VMDFactory.createVMDNodeBorder ());
    widget.setOpaque (false);

    Widget header = widget.getHeader ();
    header.setBorder (BORDER_PIN);
    header.setBackground (COLOR_SELECTED);
    header.setOpaque (false);

    Widget minimize = widget.getMinimizeButton ();
    minimize.setBorder (BORDER_MINIMIZE);

    Widget pinsSeparator = widget.getPinsSeparator ();
    pinsSeparator.setForeground (BORDER_CATEGORY_BACKGROUND);
}
 
Example 7
Source File: VMDNetBeans60ColorScheme.java    From netbeans with Apache License 2.0 5 votes vote down vote up
public void installUI (VMDNodeWidget widget) {
    widget.setBorder (BORDER60);

    Widget header = widget.getHeader ();
    header.setBackground (COLOR60_HOVER_BACKGROUND);
    header.setBorder (VMDOriginalColorScheme.BORDER_PIN);

    Widget pinsSeparator = widget.getPinsSeparator ();
    pinsSeparator.setForeground (VMDOriginalColorScheme.BORDER_CATEGORY_BACKGROUND);
}
 
Example 8
Source File: ControlFlowScene.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public Widget createSelectionWidget() {
    Widget widget = new Widget(this);
    widget.setOpaque(false);
    widget.setBorder(BorderFactory.createLineBorder(Color.black, 2));
    widget.setForeground(Color.red);
    return widget;
}
 
Example 9
Source File: ControlFlowScene.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public Widget createSelectionWidget() {
    Widget widget = new Widget(this);
    widget.setOpaque(false);
    widget.setBorder(BorderFactory.createLineBorder(Color.black, 2));
    widget.setForeground(Color.red);
    return widget;
}
 
Example 10
Source File: ControlFlowScene.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public Widget createSelectionWidget() {
    Widget widget = new Widget(this);
    widget.setOpaque(false);
    widget.setBorder(BorderFactory.createLineBorder(Color.black, 2));
    widget.setForeground(Color.red);
    return widget;
}
 
Example 11
Source File: ControlFlowScene.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public Widget createSelectionWidget() {
    Widget widget = new Widget(this);
    widget.setOpaque(false);
    widget.setBorder(BorderFactory.createLineBorder(Color.black, 2));
    widget.setForeground(Color.red);
    return widget;
}
 
Example 12
Source File: ControlFlowScene.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public Widget createSelectionWidget() {
    Widget widget = new Widget(this);
    widget.setOpaque(false);
    widget.setBorder(BorderFactory.createLineBorder(Color.black, 2));
    widget.setForeground(Color.red);
    return widget;
}