javax.swing.JPanel.doLayout()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(202)

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

JPanel.doLayout介绍

暂无

代码示例

代码示例来源:origin: winder/Universal-G-Code-Sender

@Override
public void doLayout() {
  super.doLayout();
}

代码示例来源:origin: stackoverflow.com

JScrollPane scroll = new JScrollPane(table);
 JPanel p = new JPanel(new BorderLayout());
 p.add(scroll, BorderLayout.CENTER);
 JOptionPane.showMessageDialog(null, p);
 table.addNotify();
 p.doLayout();
 BufferedImage bi = new BufferedImage(p.getWidth() + 100,
     p.getHeight() + 100, BufferedImage.TYPE_INT_RGB);
 Graphics g = bi.createGraphics();
 p.paint(g);
 g.dispose();

代码示例来源:origin: winder/Universal-G-Code-Sender

super.doLayout();

代码示例来源:origin: winder/Universal-G-Code-Sender

@Override
public void doLayout() {
  Integer lastMacroIndex = backend.getSettings().getLastMacroIndex()+1;
  // Create components if needed
  for (int i = customGcodeButtons.size(); i <= lastMacroIndex; i++) {
    Macro macro = backend.getSettings().getMacro(i);
    customGcodeButtons.add(createMacroButton(i));
    macroGcodeFields.add(createMacroField(i, MACRO_FIELD.CODE, macro.getGcode()));
    macroNameFields.add(createMacroField(i, MACRO_FIELD.NAME, macro.getName()));
    macroDescriptionFields.add(createMacroField(i, MACRO_FIELD.DESCRIPTION, macro.getDescription()));
  }
  add(this.buttonPanel, "grow, span 4");
  add(buttonHeader, "sg 1");
  add(nameHeader);
  add(gcodeHeader);
  add(descriptionHeader);
  for (int i = 0; i < customGcodeButtons.size(); i++) {
    add(customGcodeButtons.get(i), "sg 1");
    add(macroNameFields.get(i));
    add(macroGcodeFields.get(i));
    add(macroDescriptionFields.get(i));
  }
  updateCustomGcodeControls(backend.isIdle());
  super.doLayout();
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-propertyeditors

public void doLayout() {
  super.doLayout();
  initializing = false;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-visualweb-jsfsupport-designtime

public void doLayout() {
  super.doLayout();
  initializing = false;
}

代码示例来源:origin: org.gosu-lang.gosu/gosu-editor

public int getPreferredHeight()
{
 if( _labelContainer == null )
 {
  return 0;
 }
 _labelContainer.doLayout();
 return _labelContainer.getPreferredSize().height + 2;
}

代码示例来源:origin: stackoverflow.com

JPanel panel = new JPanel();
...  // add components
panel.setSize(300, 300);
panel.doLayout();

代码示例来源:origin: com.github.insubstantial/flamingo

@Override
public void doLayout() {
  super.doLayout();
  this.fireStateChanged();
}

代码示例来源:origin: stackoverflow.com

// Creating the panel
JPanel lPanel = new JPanel();
//lPanel.setSize(1000, 1000); //default size, not needed anymore
lPanel.setLayout(new BoxLayout(lPanel, BoxLayout.PAGE_AXIS));

//Adding the content
lPanel.add(new JLabel("Blah"));
// etc...

//Adjust the panel to its preferred size
lPanel.setSize(lPanel.getPreferredSize());

//Call the layout method 
//(this will adjust the content components to their correct size and position)
lPanel.doLayout();

代码示例来源:origin: xyz.cofe/docking-frames-ext-toolbar

@Override
public Dimension getPreferredSize(){
  // this is a workaround because the boundaries of the children are required to
  // compute the preferred size of this components. It is not pretty...
  if( dockablePane != null && !dockablePane.isValid() ){
    dockablePane.doLayout();
  }
  
  return getBasePane().getPreferredSize();
}

代码示例来源:origin: com.threerings/nenya

@Override
public void doLayout ()
{
  super.doLayout();
  generateSprite();
  centerSprite();
}

代码示例来源:origin: threerings/nenya

@Override
public void doLayout ()
{
  super.doLayout();
  generateSprite();
  centerSprite();
}

代码示例来源:origin: cytoscape/application

/**
 * This method is called to update the panel for this property sheet.
 */
public void updateTunablePanel() {
  if (tunablesPanel == null) return;
  tunablesPanel.removeAll();
  addSubPanels(tunablesPanel, tunablesList.iterator(), new Integer(100000), null);
  tunablesPanel.doLayout();
  tunablesPanel.validate();
  // now signal any listeners that we've resized
  ComponentListener[] resizeListeners = tunablesPanel.getComponentListeners();
  if (resizeListeners == null) return;
  for (int i = 0; i < resizeListeners.length; i++) {
    resizeListeners[i].componentResized(new ComponentEvent(tunablesPanel, ComponentEvent.COMPONENT_RESIZED));
  }
}

代码示例来源:origin: senbox-org/snap-desktop

@Override
public void doLayout() {
  if (navControlShown && navControlWrapper != null) {
    navControlWrapper.setLocation(getWidth() - navControlWrapper.getWidth() - 4, 4);
  }
  super.doLayout();
}

代码示例来源:origin: bcdev/beam

@Override
public void doLayout() {
  if (navControlShown && navControlWrapper != null) {
    navControlWrapper.setLocation(getWidth() - navControlWrapper.getWidth() - 4, 4);
  }
  super.doLayout();
}

代码示例来源:origin: senbox-org/snap-desktop

@Override
public void doLayout() {
  if (navControlShown && navControlWrapper != null) {
    navControlWrapper.setLocation(getWidth() - navControlWrapper.getWidth() - 4, 4);
  }
  super.doLayout();
}

代码示例来源:origin: com.jidesoft/jide-oss

/**
 * Causes this container to lay out its components.  Most programs should not call this method directly, but should
 * invoke the <code>validate</code> method instead.
 *
 * @see LayoutManager#layoutContainer
 * @see #setLayout
 * @see #validate
 * @since JDK1.1
 */
@Override
public void doLayout() {
  if (removeExtraDividers()) {
    ((JideSplitPaneLayout) getLayout()).invalidateLayout(this);
  }
  super.doLayout();
}

代码示例来源:origin: com.eas.platypus/platypus-js-grid

@Override
public void doLayout() {
  if (table != null) {
    table.setSize(getSize().width, table.getSize().height);
    table.doLayout();
  }
  super.doLayout();
}

代码示例来源:origin: igvteam/igv

@Override
public void doLayout() {
  layoutFrames();
  super.doLayout();
  applicationHeaderPanel.doLayout();
  for (TrackPanel tp : getTrackPanels()) {
    tp.getScrollPane().doLayout();
  }
}

相关文章

JPanel类方法