Java Code Examples for org.netbeans.api.visual.model.ObjectState#isHighlighted()
The following examples show how to use
org.netbeans.api.visual.model.ObjectState#isHighlighted() .
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: VMDOriginalColorScheme.java From netbeans with Apache License 2.0 | 6 votes |
public void updateUI (VMDConnectionWidget widget, ObjectState previousState, ObjectState state) { if (state.isHovered ()) widget.setForeground (COLOR_HOVERED); else if (state.isSelected ()) widget.setForeground (COLOR_SELECTED); else if (state.isHighlighted ()) widget.setForeground (COLOR_HIGHLIGHTED); else if (state.isFocused ()) widget.setForeground (COLOR_HOVERED); else widget.setForeground (COLOR_NORMAL); if (state.isSelected ()) { widget.setControlPointShape (PointShape.SQUARE_FILLED_SMALL); widget.setEndPointShape (PointShape.SQUARE_FILLED_BIG); } else { widget.setControlPointShape (PointShape.NONE); widget.setEndPointShape (POINT_SHAPE_IMAGE); } }
Example 2
Source File: VMDNetBeans60ColorScheme.java From netbeans with Apache License 2.0 | 6 votes |
public void updateUI (VMDConnectionWidget widget, ObjectState previousState, ObjectState state) { if (state.isSelected ()) widget.setForeground (COLOR60_SELECT); else if (state.isHighlighted ()) widget.setForeground (VMDOriginalColorScheme.COLOR_HIGHLIGHTED); else if (state.isHovered () || state.isFocused ()) widget.setForeground (COLOR60_HOVER); else widget.setForeground (VMDOriginalColorScheme.COLOR_NORMAL); if (state.isSelected () || state.isHovered ()) { widget.setControlPointShape (PointShape.SQUARE_FILLED_SMALL); widget.setEndPointShape (PointShape.SQUARE_FILLED_BIG); widget.setControlPointCutDistance (0); } else { widget.setControlPointShape (PointShape.NONE); widget.setEndPointShape (POINT_SHAPE60_IMAGE); widget.setControlPointCutDistance (5); } }
Example 3
Source File: PFENotModifiableScheme.java From netbeans with Apache License 2.0 | 6 votes |
public void updateUI (VMDConnectionWidget widget, ObjectState previousState, ObjectState state) { if (state.isSelected ()) { widget.setForeground (COLOR60_SELECT); } else if (state.isHighlighted ()) { widget.setForeground (COLOR_HIGHLIGHTED); } else if (state.isHovered () || state.isFocused ()) { widget.setForeground (COLOR60_HOVER); } else { widget.setForeground (COLOR_NORMAL); } if (state.isSelected () || state.isHovered ()) { widget.setControlPointShape (PointShape.SQUARE_FILLED_SMALL); widget.setEndPointShape (PointShape.SQUARE_FILLED_BIG); widget.setControlPointCutDistance (0); } else { widget.setControlPointShape (PointShape.NONE); widget.setEndPointShape (POINT_SHAPE_IMAGE); widget.setControlPointCutDistance (5); } }
Example 4
Source File: FigureWidget.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
@Override protected void notifyStateChanged(ObjectState previousState, ObjectState state) { super.notifyStateChanged(previousState, state); Font font = this.figure.getDiagram().getFont(); if (state.isSelected()) { font = this.figure.getDiagram().getBoldFont(); } Color borderColor = Color.BLACK; Color innerBorderColor = getFigure().getColor(); if (state.isHighlighted()) { innerBorderColor = borderColor = Color.BLUE; } middleWidget.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createLineBorder(borderColor, 1), BorderFactory.createLineBorder(innerBorderColor, 1))); for (LabelWidget labelWidget : labelWidgets) { labelWidget.setFont(font); } repaint(); }
Example 5
Source File: DefaultLookFeel.java From netbeans with Apache License 2.0 | 5 votes |
public Color getLineColor (ObjectState state) { if (state.isHovered ()) return COLOR_HOVERED; if (state.isSelected ()) return COLOR_SELECTED; if (state.isHighlighted () || state.isFocused ()) return COLOR_HIGHLIGHTED; return getForeground ();//Color.BLACK; }
Example 6
Source File: DefaultLookFeel.java From netbeans with Apache License 2.0 | 5 votes |
public Paint getBackground (ObjectState state) { if (state.isHovered ()) return COLOR_HOVERED; if (state.isSelected ()) return COLOR_SELECTED; if (state.isHighlighted () || state.isFocused ()) return COLOR_HIGHLIGHTED; return getBackground ();//Color.WHITE; }