本文整理汇总了Java中org.netbeans.modeler.widget.pin.IPinWidget.setBorder方法的典型用法代码示例。如果您正苦于以下问题:Java IPinWidget.setBorder方法的具体用法?Java IPinWidget.setBorder怎么用?Java IPinWidget.setBorder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.netbeans.modeler.widget.pin.IPinWidget
的用法示例。
在下文中一共展示了IPinWidget.setBorder方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: installUI
import org.netbeans.modeler.widget.pin.IPinWidget; //导入方法依赖的package包/类
@Override
public void installUI(IPinWidget widget) {
widget.setBorder(OPAQUE_BORDER);
Rectangle bound = widget.getBounds();
if (bound != null) {
GradientPaint gp = new GradientPaint(bound.x, bound.y, PIN_WIDGET_BACKGROUND, bound.x, bound.height, PIN_WIDGET_LBACKGROUND);
widget.setBackground(gp);
}
widget.getPinNameWidget().setForeground(widget.getTextDesign().getColor()!=null?widget.getTextDesign().getColor():PIN_WIDGET_TEXT_COLOR);
Font font = widget.getPinNameWidget().getFont()!=null?widget.getPinNameWidget().getFont():widget.getScene().getDefaultFont();
widget.getPinNameWidget().setFont(font.deriveFont(widget.getTextDesign().getStyle(), widget.getTextDesign().getSize()));
}
示例2: installUI
import org.netbeans.modeler.widget.pin.IPinWidget; //导入方法依赖的package包/类
@Override
public void installUI(IPinWidget widget) {
widget.setBorder(BORDER_PIN);
widget.setBackground(COLOR60_HOVER_BACKGROUND);
widget.getPinNameWidget().setForeground(widget.getTextDesign().getColor()!=null?widget.getTextDesign().getColor():Color.BLACK);
Font font = widget.getPinNameWidget().getFont()!=null?widget.getPinNameWidget().getFont():widget.getScene().getDefaultFont();
widget.getPinNameWidget().setFont(font.deriveFont(widget.getTextDesign().getStyle(), widget.getTextDesign().getSize()));
}
示例3: updateUI
import org.netbeans.modeler.widget.pin.IPinWidget; //导入方法依赖的package包/类
@Override
public void updateUI(IPinWidget widget, ObjectState previousState, ObjectState state) {
widget.setOpaque(state.isHovered() || state.isFocused());
if (state.isSelected()) {
widget.setBorder(BORDER60_PIN_SELECT);
} else {
widget.setBorder(BORDER_PIN);
}
}
示例4: installUI
import org.netbeans.modeler.widget.pin.IPinWidget; //导入方法依赖的package包/类
@Override
public void installUI(IPinWidget widget) {
widget.setBorder(OPAQUE_BORDER);
widget.setBackground(PIN_WIDGET_BACKGROUND);
widget.getPinNameWidget().setForeground(widget.getTextDesign().getColor()!=null?widget.getTextDesign().getColor():PIN_WIDGET_TEXT_COLOR);
Font font = widget.getPinNameWidget().getFont()!=null?widget.getPinNameWidget().getFont():widget.getScene().getDefaultFont();
widget.getPinNameWidget().setFont(font.deriveFont(widget.getTextDesign().getStyle(), widget.getTextDesign().getSize()));
}
示例5: installUI
import org.netbeans.modeler.widget.pin.IPinWidget; //导入方法依赖的package包/类
@Override
public void installUI(IPinWidget widget) {
widget.setBorder(BORDER_PIN);
widget.setBackground(PIN_WIDGET_HOVER_BACKGROUND);
widget.getPinNameWidget().setForeground(widget.getTextDesign().getColor()!=null?widget.getTextDesign().getColor():WIDGET_HOVER_BACKGROUND);
Font font = widget.getPinNameWidget().getFont()!=null?widget.getPinNameWidget().getFont():widget.getScene().getDefaultFont();
widget.getPinNameWidget().setFont(font.deriveFont(widget.getTextDesign().getStyle(), widget.getTextDesign().getSize()));
}
示例6: installUI
import org.netbeans.modeler.widget.pin.IPinWidget; //导入方法依赖的package包/类
@Override
public void installUI(IPinWidget widget) {
widget.setBorder(BORDER_PIN);
widget.setBackground(COLOR_SELECTED);
widget.setOpaque(false);
}
示例7: updateUI
import org.netbeans.modeler.widget.pin.IPinWidget; //导入方法依赖的package包/类
@Override
public void updateUI(IPinWidget widget, ObjectState previousState, ObjectState state) {
widget.setOpaque(state.isSelected());
widget.setBorder(state.isFocused() || state.isHovered() ? BORDER_PIN_HOVERED : BORDER_PIN);
// LookFeel lookFeel = getScene ().getLookFeel ();
// setBorder (BorderFactory.createCompositeBorder (BorderFactory.createEmptyBorder (8, 2), lookFeel.getMiniBorder (state)));
// setForeground (lookFeel.getForeground (state));
}
示例8: highlightUI
import org.netbeans.modeler.widget.pin.IPinWidget; //导入方法依赖的package包/类
@Override
public void highlightUI(IPinWidget widget) {
widget.setBorder(BorderFactory.createCompositeBorder(BorderFactory.createLineBorder(0, 1, 0, 1, new Color(60, 60, 70)), BorderFactory.createLineBorder(3, 4, 3, 4, new Color(60, 60, 70))));
}
示例9: installUI
import org.netbeans.modeler.widget.pin.IPinWidget; //导入方法依赖的package包/类
@Override
public void installUI(IPinWidget widget) {
widget.setBorder(OPAQUE_BORDER);
widget.setBackground(PIN_WIDGET_BACKGROUND);
widget.getPinNameWidget().setForeground(PIN_WIDGET_TEXT_COLOR);
}