org.netbeans.api.visual.border.Border Java Examples
The following examples show how to use
org.netbeans.api.visual.border.Border.
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: CompositeBorder.java From netbeans with Apache License 2.0 | 5 votes |
public void paint (Graphics2D gr, Rectangle bounds) { for (Border border : borders) { border.paint (gr, new Rectangle (bounds)); Insets insets = border.getInsets (); bounds.x += insets.left; bounds.width -= insets.left + insets.right; bounds.y += insets.top; bounds.height -= insets.top + insets.bottom; } }
Example #2
Source File: CompositeBorder.java From netbeans with Apache License 2.0 | 5 votes |
public boolean isOpaque () { for (Border border : borders) { if (border.isOpaque ()) return true; } return false; }
Example #3
Source File: DefaultLookFeel.java From netbeans with Apache License 2.0 | 5 votes |
public Border getBorder (ObjectState state) { if (state.isHovered ()) return BORDER_HOVERED; if (state.isSelected ()) return BORDER_SELECTED; if (state.isFocused ()) return BORDER_HOVERED; return BORDER_NORMAL; }
Example #4
Source File: DefaultLookFeel.java From netbeans with Apache License 2.0 | 5 votes |
public Border getMiniBorder (ObjectState state) { if (state.isHovered ()) return MINI_BORDER_HOVERED; if (state.isSelected ()) return MINI_BORDER_SELECTED; if (state.isFocused ()) return MINI_BORDER_HOVERED; return MINI_BORDER_NORMAL; }
Example #5
Source File: CompositeBorder.java From netbeans with Apache License 2.0 | 5 votes |
public CompositeBorder (Border... borders) { this.borders = borders; Insets result = new Insets (0, 0, 0, 0); for (Border border : borders) { Insets insets = border.getInsets (); result.top += insets.top; result.left += insets.left; result.bottom += insets.bottom; result.right += insets.right; } this.insets = result; }
Example #6
Source File: Widget.java From netbeans with Apache License 2.0 | 5 votes |
/** * Sets the border of the widget. * @param border the border */ public final void setBorder (Border border) { assert border != null; boolean repaintOnly = this.border.getInsets ().equals (border.getInsets ()); this.border = border; revalidate (repaintOnly); }
Example #7
Source File: SwingBorder.java From netbeans with Apache License 2.0 | 4 votes |
public SwingBorder (Scene scene, javax.swing.border.Border swingBorder) { assert scene != null && swingBorder != null; this.scene = scene; this.swingBorder = swingBorder; }
Example #8
Source File: SwingBorder.java From netbeans with Apache License 2.0 | 4 votes |
public javax.swing.border.Border getSwingBorder () { return swingBorder; }
Example #9
Source File: SceneUtils.java From Llunatic with GNU General Public License v3.0 | 4 votes |
public static Border getPremiseBorder() { return VMDFactory.createVMDNodeBorder(PREMISE_COLOR, 2, Color.white, Color.white, Color.white, Color.white, Color.white); }
Example #10
Source File: ModelGraphScene.java From opensim-gui with Apache License 2.0 | 4 votes |
/** * @return the BORDER_0 */ public static Border getBORDER_0() { return BORDER_0; }
Example #11
Source File: Widget.java From netbeans with Apache License 2.0 | 4 votes |
/** * Sets the Swing layout as the border of the widget. * @param swingBorder the Swing border */ public final void setBorder (javax.swing.border.Border swingBorder) { assert swingBorder != null; setBorder (BorderFactory.createSwingBorder (scene, swingBorder)); }
Example #12
Source File: SceneUtils.java From Llunatic with GNU General Public License v3.0 | 2 votes |
public static Border getConclusionBorder() { return VMDFactory.createVMDNodeBorder(CONCLUSION_COLOR, 2, Color.white, Color.white, Color.white, Color.white, Color.white); }
Example #13
Source File: Widget.java From netbeans with Apache License 2.0 | 2 votes |
/** * Returns the border of the widget. * @return the border */ public final Border getBorder () { return border; }
Example #14
Source File: LookFeel.java From netbeans with Apache License 2.0 | 2 votes |
/** * Returns a minimalistic version of border for a specific state. * @param state the state * @return the mini-border */ public abstract Border getMiniBorder (ObjectState state);
Example #15
Source File: LookFeel.java From netbeans with Apache License 2.0 | 2 votes |
/** * Returns a border for a specific state. * @param state the state * @return the border */ public abstract Border getBorder (ObjectState state);
Example #16
Source File: VMDFactory.java From netbeans with Apache License 2.0 | 2 votes |
/** * Creates a border used by VMD node with a specific colors. * @return the VMD node border * @param borderColor the border color * @param borderThickness the border thickness * @param color1 1. color of gradient background * @param color2 2. color of gradient background * @param color3 3. color of gradient background * @param color4 4. color of gradient background * @param color5 5. color of gradient background * @since 2.5 */ public static Border createVMDNodeBorder (Color borderColor, int borderThickness, Color color1, Color color2, Color color3, Color color4, Color color5) { return new VMDNodeBorder (borderColor, borderThickness, color1, color2, color3, color4, color5); }
Example #17
Source File: VMDFactory.java From netbeans with Apache License 2.0 | 2 votes |
/** * Creates a border used by VMD node. * @return the VMD node border */ public static Border createVMDNodeBorder () { return VMDOriginalColorScheme.BORDER_NODE; }