org.netbeans.api.visual.widget.Widget.setLayout()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(115)

本文整理了Java中org.netbeans.api.visual.widget.Widget.setLayout()方法的一些代码示例,展示了Widget.setLayout()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Widget.setLayout()方法的具体详情如下:
包路径:org.netbeans.api.visual.widget.Widget
类名称:Widget
方法名:setLayout

Widget.setLayout介绍

[英]Sets the layout of the widget.
[中]设置小部件的布局。

代码示例

代码示例来源:origin: it.tidalwave.semantic/it-tidalwave-semantic-graph

propertiesWidget.setLayout(LayoutFactory.createVerticalFlowLayout());
  propertiesWidget.setOpaque(false);
  propertiesWidget.setBorder(BORDER_4);
widget.setLayout(LayoutFactory.createHorizontalFlowLayout());

代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual

/**
 * Creates a list widget.
 * @param scene the scene
 */
public ListWidget (Scene scene) {
  super (scene);
  GeomUtil.LOG.warning ("org.netbeans.api.visual.widget.general.ListWidget class is deprecated. Use org.netbeans.modules.visual.experimental.widget.general.ListWidget class instead. Since it is an experimental class outside of public-API packages, you have to set an implementation dependency on the org.netbeans.api.visual module."); // NOI18N
  LookFeel lookFeel = scene.getLookFeel ();
  setOpaque (true);
  setBackground (lookFeel.getBackground ());
  setBorder (BorderFactory.createLineBorder ());
  setLayout (LayoutFactory.createVerticalFlowLayout ());
  header = new Widget (scene);
  header.setLayout (LayoutFactory.createHorizontalFlowLayout (LayoutFactory.SerialAlignment.CENTER, 0));
  header.addChild (imageWidget = new ImageWidget (scene));
  header.addChild (labelWidget = new LabelWidget (scene));
  addChild (header);
  addChild (new SeparatorWidget (scene, SeparatorWidget.Orientation.HORIZONTAL));
  setState (ObjectState.createNormal ());
}

代码示例来源:origin: in.jlibs/org-netbeans-api-visual

/**
 * Creates a list widget.
 * @param scene the scene
 */
public ListWidget (Scene scene) {
  super (scene);
  GeomUtil.LOG.warning ("org.netbeans.api.visual.widget.general.ListWidget class is deprecated. Use org.netbeans.modules.visual.experimental.widget.general.ListWidget class instead. Since it is an experimental class outside of public-API packages, you have to set an implementation dependency on the org.netbeans.api.visual module."); // NOI18N
  LookFeel lookFeel = scene.getLookFeel ();
  setOpaque (true);
  setBackground (lookFeel.getBackground ());
  setBorder (BorderFactory.createLineBorder ());
  setLayout (LayoutFactory.createVerticalFlowLayout ());
  header = new Widget (scene);
  header.setLayout (LayoutFactory.createHorizontalFlowLayout (LayoutFactory.SerialAlignment.CENTER, 0));
  header.addChild (imageWidget = new ImageWidget (scene));
  header.addChild (labelWidget = new LabelWidget (scene));
  addChild (header);
  addChild (new SeparatorWidget (scene, SeparatorWidget.Orientation.HORIZONTAL));
  setState (ObjectState.createNormal ());
}

代码示例来源:origin: in.jlibs/org-netbeans-api-visual

/**
 * Creates a list widget.
 * @param scene the scene
 */
public ListWidget (Scene scene) {
  super (scene);
  LookFeel lookFeel = scene.getLookFeel ();
  setOpaque (true);
  setBackground (lookFeel.getBackground ());
  setBorder (BorderFactory.createLineBorder ());
  setLayout (LayoutFactory.createVerticalFlowLayout ());
  header = new Widget (scene);
  header.setLayout (LayoutFactory.createHorizontalFlowLayout (LayoutFactory.SerialAlignment.CENTER, 0));
  header.addChild (imageWidget = new ImageWidget (scene));
  header.addChild (labelWidget = new LabelWidget (scene));
  addChild (header);
  addChild (new SeparatorWidget (scene, SeparatorWidget.Orientation.HORIZONTAL));
  setState (ObjectState.createNormal ());
}

代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual

/**
 * Creates a list widget.
 * @param scene the scene
 */
public ListWidget (Scene scene) {
  super (scene);
  LookFeel lookFeel = scene.getLookFeel ();
  setOpaque (true);
  setBackground (lookFeel.getBackground ());
  setBorder (BorderFactory.createLineBorder ());
  setLayout (LayoutFactory.createVerticalFlowLayout ());
  header = new Widget (scene);
  header.setLayout (LayoutFactory.createHorizontalFlowLayout (LayoutFactory.SerialAlignment.CENTER, 0));
  header.addChild (imageWidget = new ImageWidget (scene));
  header.addChild (labelWidget = new LabelWidget (scene));
  addChild (header);
  addChild (new SeparatorWidget (scene, SeparatorWidget.Orientation.HORIZONTAL));
  setState (ObjectState.createNormal ());
}

代码示例来源:origin: in.jlibs/org-netbeans-api-visual

header.setLayout (LayoutFactory.createHorizontalFlowLayout (LayoutFactory.SerialAlignment.CENTER, 8));
addChild (header);

代码示例来源:origin: org.netbeans.api/org-netbeans-api-visual

header.setLayout (LayoutFactory.createHorizontalFlowLayout (LayoutFactory.SerialAlignment.CENTER, 8));
addChild (header);

相关文章