本文整理了Java中org.netbeans.api.visual.widget.Widget.setBorder()
方法的一些代码示例,展示了Widget.setBorder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Widget.setBorder()
方法的具体详情如下:
包路径:org.netbeans.api.visual.widget.Widget
类名称:Widget
方法名:setBorder
[英]Sets the Swing layout as the border of the widget.
[中]将Swing布局设置为小部件的边框。
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
/**
* 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));
}
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
/**
* 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));
}
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
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);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
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);
}
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
public Widget createSelectionWidget () {
Widget widget = new Widget (scene);
widget.setBorder (scene.getLookFeel ().getMiniBorder (ObjectState.createNormal ().deriveSelected (true)));
return widget;
}
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
public void installUI (VMDNodeWidget widget) {
widget.setBorder (BORDER60);
Widget header = widget.getHeader ();
header.setBackground (COLOR60_HOVER_BACKGROUND);
header.setBorder (VMDOriginalColorScheme.BORDER_PIN);
Widget pinsSeparator = widget.getPinsSeparator ();
pinsSeparator.setForeground (VMDOriginalColorScheme.BORDER_CATEGORY_BACKGROUND);
}
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
public Widget createSelectionWidget () {
Widget widget = new Widget (scene);
widget.setBorder (scene.getLookFeel ().getMiniBorder (ObjectState.createNormal ().deriveSelected (true)));
return widget;
}
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
public void installUI (VMDNodeWidget widget) {
widget.setBorder (BORDER60);
Widget header = widget.getHeader ();
header.setBackground (COLOR60_HOVER_BACKGROUND);
header.setBorder (VMDOriginalColorScheme.BORDER_PIN);
Widget pinsSeparator = widget.getPinsSeparator ();
pinsSeparator.setForeground (VMDOriginalColorScheme.BORDER_CATEGORY_BACKGROUND);
}
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
/**
* Implements the widget-state specific look of the widget.
* @param previousState the previous state
* @param state the new state
*/
public void notifyStateChanged (ObjectState previousState, ObjectState state) {
LookFeel lookFeel = getScene ().getLookFeel ();
header.setBorder (BorderFactory.createCompositeBorder (BorderFactory.createEmptyBorder (2), lookFeel.getBorder (state)));
labelWidget.setForeground (lookFeel.getForeground (state));
}
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
/**
* Implements the widget-state specific look of the widget.
* @param previousState the previous state
* @param state the new state
*/
public void notifyStateChanged (ObjectState previousState, ObjectState state) {
LookFeel lookFeel = getScene ().getLookFeel ();
header.setBorder (BorderFactory.createCompositeBorder (BorderFactory.createEmptyBorder (2), lookFeel.getBorder (state)));
labelWidget.setForeground (lookFeel.getForeground (state));
}
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
/**
* Implements the widget-state specific look of the widget.
* @param previousState the previous state
* @param state the new state
*/
public void notifyStateChanged (ObjectState previousState, ObjectState state) {
LookFeel lookFeel = getScene ().getLookFeel ();
header.setBorder (BorderFactory.createCompositeBorder (BorderFactory.createEmptyBorder (2), lookFeel.getBorder (state)));
labelWidget.setForeground (lookFeel.getForeground (state));
}
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
/**
* Implements the widget-state specific look of the widget.
* @param previousState the previous state
* @param state the new state
*/
public void notifyStateChanged (ObjectState previousState, ObjectState state) {
LookFeel lookFeel = getScene ().getLookFeel ();
header.setBorder (BorderFactory.createCompositeBorder (BorderFactory.createEmptyBorder (2), lookFeel.getBorder (state)));
labelWidget.setForeground (lookFeel.getForeground (state));
}
代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual
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);
}
代码示例来源:origin: in.jlibs/org-netbeans-api-visual
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);
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-callgraph
@Override
protected Widget attachNodeWidget(Function node) {
String name;
if (CallGraphPreferences.isShowParameters()) {
name = node.getDescription();
} else {
name = node.getName();
}
String scope = node.getScopeName();
Widget label;
if (scope != null && scope.length() > 0){
if (name.startsWith(scope)) {
name = name.substring(scope.length());
}
label = new MyMemberLabelWidget(this, scope, name);
} else {
label = new MyLabelWidget(this, name);
}
if (node.isVurtual()) {
label.setFont(defaultItalicFont);
}
label.setToolTipText(node.getDescription());
label.setBorder(BORDER_4);
label.getActions().addAction(moveAction);
label.getActions().addAction(hoverAction);
label.getActions().addAction(ActionFactory.createEditAction(new NodeEditProvider(node)));
label.getActions().addAction(popupAction);
mainLayer.addChild(label);
return label;
}
代码示例来源:origin: it.tidalwave.semantic/it-tidalwave-semantic-graph
propertiesWidget.setLayout(LayoutFactory.createVerticalFlowLayout());
propertiesWidget.setOpaque(false);
propertiesWidget.setBorder(BORDER_4);
addChild(propertiesWidget);
内容来源于网络,如有侵权,请联系作者删除!