Java Code Examples for org.netbeans.api.visual.widget.Widget#setOpaque()
The following examples show how to use
org.netbeans.api.visual.widget.Widget#setOpaque() .
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: LayerWidget103528Test.java From netbeans with Apache License 2.0 | 6 votes |
public void testLayerPreferredLocation () { Scene scene = new Scene (); scene.addChild (new LayerWidget (scene)); LayerWidget layer = new LayerWidget (scene); layer.setPreferredLocation (new Point (100, 100)); scene.addChild (layer); Widget widget = new Widget (scene); widget.setPreferredBounds (new Rectangle (-20, -10, 100, 50)); widget.setOpaque (true); widget.setBackground (Color.RED); layer.addChild (widget); Color color = (Color) (new DefaultLookFeel()).getBackground(); assertScene (scene, color, new Rectangle (80, 90, 100, 50)); }
Example 2
Source File: ParametersWidget.java From netbeans with Apache License 2.0 | 6 votes |
private void createContent() { model = new ParametersTableModel(method, nameEditable); populateContentWidget(getContentWidget()); getContentWidget().setBorder(BorderFactory.createEmptyBorder(0,1,1,1)); headerLabelWidget = new ImageLabelWidget(getScene(), getIcon(), getTitle(), "("+method.getParams().size()+")"); headerLabelWidget.setLabelFont(getScene().getFont().deriveFont(Font.BOLD)); getHeaderWidget().addChild(new Widget(getScene()),5); getHeaderWidget().addChild(headerLabelWidget); getHeaderWidget().addChild(new Widget(getScene()),4); buttons = new Widget(getScene()); buttons.setLayout(LayoutFactory.createHorizontalFlowLayout( LayoutFactory.SerialAlignment.CENTER, 8)); buttons.addChild(getExpanderWidget()); buttons.setOpaque(true); buttons.setBackground(TITLE_COLOR_BRIGHT); getHeaderWidget().addChild(buttons); }
Example 3
Source File: GraphColorScheme.java From Llunatic with GNU General Public License v3.0 | 6 votes |
@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 4
Source File: GraphColorScheme.java From Llunatic with GNU General Public License v3.0 | 6 votes |
@Override public void updateUI(VMDNodeWidget widget, ObjectState previousState, ObjectState state) { if (!previousState.isSelected() && state.isSelected()) { widget.bringToFront(); } else if (!previousState.isHovered() && state.isHovered()) { widget.bringToFront(); } Widget header = widget.getHeader(); header.setOpaque(state.isSelected()); if (state.isFocused() || state.isHovered()) { header.setBorder(BORDER_PIN_HOVERED); } else { header.setBorder(HEADER_BORDER_PIN); } }
Example 5
Source File: ControlFlowScene.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
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: ControlFlowScene.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
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 7
Source File: ControlFlowScene.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
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 8
Source File: VMDOriginalColorScheme.java From netbeans with Apache License 2.0 | 5 votes |
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 9
Source File: VMDOriginalColorScheme.java From netbeans with Apache License 2.0 | 5 votes |
public void updateUI (VMDNodeWidget widget, ObjectState previousState, ObjectState state) { if (! previousState.isSelected () && state.isSelected ()) widget.bringToFront (); else if (! previousState.isHovered () && state.isHovered ()) widget.bringToFront (); Widget header = widget.getHeader (); header.setOpaque (state.isSelected ()); header.setBorder (state.isFocused () || state.isHovered () ? BORDER_PIN_HOVERED : BORDER_PIN); }
Example 10
Source File: FlowLayout105400Test.java From netbeans with Apache License 2.0 | 5 votes |
public void testFlowLayoutInsets () { Scene scene = new Scene (); Widget parent = new Widget (scene); parent.setBorder (BorderFactory.createResizeBorder (10)); parent.setLayout (LayoutFactory.createVerticalFlowLayout ()); scene.addChild (parent); Widget child = new Widget (scene); child.setBackground (Color.BLUE); child.setOpaque (true); child.setPreferredBounds (new Rectangle (-50, -30, 30, 20)); parent.addChild (child); assertScene (scene, Color.WHITE, new Rectangle (-1, -1, 52, 42)); }
Example 11
Source File: ControlFlowScene.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
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-jdk9 with GNU General Public License v2.0 | 5 votes |
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 13
Source File: ControlFlowScene.java From hottub with GNU General Public License v2.0 | 5 votes |
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 14
Source File: ControlFlowScene.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
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 15
Source File: ControlFlowScene.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public Widget createSelectionWidget() { Widget widget = new Widget(this); widget.setOpaque(false); widget.setBorder(BorderFactory.createLineBorder(Color.black, 2)); widget.setForeground(Color.red); return widget; }