本文整理匯總了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);
}