• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java DefaultFormBuilder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.jgoodies.forms.builder.DefaultFormBuilder的典型用法代码示例。如果您正苦于以下问题:Java DefaultFormBuilder类的具体用法?Java DefaultFormBuilder怎么用?Java DefaultFormBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DefaultFormBuilder类属于com.jgoodies.forms.builder包,在下文中一共展示了DefaultFormBuilder类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: layoutComponents

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入依赖的package包/类
private void layoutComponents() {
    JPanel buttons = ButtonBarFactory.buildRightAlignedBar(startButton, stopButton);

    FormLayout layout = new FormLayout("right:d, 6dlu, max(d;30dlu):grow");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout, this);
    builder.append("Service status", statusTextField);
    builder.append("", buttons);
    builder.appendParagraphGapRow();
    builder.nextRow();
    builder.append("Started on", startedTextField);
    builder.append("Memory used", memoryTextField);
    builder.append("Error message", errorTextField);
    builder.append("Server address", urlButton);

    setBorder(Borders.DIALOG_BORDER);
}
 
开发者ID:sindremehus,项目名称:subsonic,代码行数:17,代码来源:StatusPanel.java


示例2: createContents

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入依赖的package包/类
protected JPanel createContents()
{
   	FormLayout layout = new FormLayout(
   			"fill:[100dlu,min]:grow",
   			"pref, pref, fill:pref:grow"
   	);

   	DefaultFormBuilder builder = new DefaultFormBuilder(layout);
   	builder.setDefaultDialogBorder();

      	pk = new ProgressKeeper((int)1E6);
      	pk.addListener(this);
	progressSent = new JProgressBar(0, pk.getTotalWork());
       builder.append(progressSent);
       builder.nextLine();
       lblTask = new JLabel();
       builder.append(lblTask);

       progressText = new JTextArea();

	builder.append(new JScrollPane(progressText));
	return builder.getPanel();
}
 
开发者ID:PathVisio,项目名称:pathvisio,代码行数:24,代码来源:GexImportWizard.java


示例3: PathwayToolTip

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入依赖的package包/类
public PathwayToolTip(List<VPathwayElement> elements) {
	applyToolTipStyle(this);
	setLayout(new BorderLayout());
	DefaultFormBuilder builder = new DefaultFormBuilder(new FormLayout("pref"));
	for(ToolTipProvider p : toolTipProviders) {
		Component c = p.createToolTipComponent(this, elements);
		if(c != null) {
			hasContent = true;
			builder.append(c);
			builder.nextLine();
		}
	}

	JPanel contents = builder.getPanel();
	applyToolTipStyle(contents);
	JScrollPane scroll = new JScrollPane(contents, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);

	int w = contents.getPreferredSize().width +
		scroll.getVerticalScrollBar().getPreferredSize().width + 5;
	int h = contents.getPreferredSize().height +
		scroll.getHorizontalScrollBar().getPreferredSize().height + 5;
	w = Math.min(400, w);
	h = Math.min(500, h);
	setPreferredSize(new Dimension(w, h));
	add(scroll, BorderLayout.CENTER);
}
 
开发者ID:PathVisio,项目名称:pathvisio,代码行数:27,代码来源:VPathwaySwing.java


示例4: refresh

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入依赖的package包/类
public void refresh() {
	if(refPanel != null) remove(refPanel);

	xrefs = refMgr.getPublicationXRefs();

	DefaultFormBuilder b = new DefaultFormBuilder(
			new FormLayout("fill:pref:grow")
	);
	for(PublicationXref xref : xrefs) {
		b.append(new XRefPanel(xref));
		b.nextLine();
	}
	JPanel p = b.getPanel();
	p.setBackground(Color.WHITE);
	refPanel = new JScrollPane(p);
	add(refPanel, BorderLayout.CENTER);
	validate();
}
 
开发者ID:PathVisio,项目名称:pathvisio,代码行数:19,代码来源:LitReferencePanel.java


示例5: addBoolean

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入依赖的package包/类
public void addBoolean(DefaultFormBuilder builder, String string, final AtsBoolean selected) {

        JCheckBox box = new JCheckBox();
        box.setSelected(selected.value_);
        // box.setHorizontalTextPosition(SwingConstants.LEFT);

        box.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                JCheckBox cb = (JCheckBox) e.getSource();
                selected.value_ = cb.isSelected();
                listener_.propertyChanged();

            }

        });
        builder.append(string, box);
    }
 
开发者ID:jdiemke,项目名称:XPTS,代码行数:18,代码来源:PropertyContainer.java


示例6: createPanel

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入依赖的package包/类
/**
   * Creates the panel layout. Requires that the GUI components have already
   * been created. Does not fill in any values into the components. See
   * {@link #switchToDsType()} for that.
   */
  private JPanel createPanel() {
      FormLayout layout = new FormLayout("fill:max(60dlu;pref), 6dlu, pref:grow", "pref, 6dlu, pref:grow, 3dlu, pref"); //$NON-NLS-1$ //$NON-NLS-2$
      DefaultFormBuilder fb = new DefaultFormBuilder(layout);
      fb.setDefaultDialogBorder();
      
      JComponent addRemoveBar = new JPanel(new FlowLayout(FlowLayout.LEFT));
      addRemoveBar.add(addDsTypeButton);
      addRemoveBar.add(removeDsTypeButton);
      
      JScrollPane dsTypePane = new JScrollPane(dsTypeList);
      //Setting the preferred size to 0 so the add/remove bar and the default size
      //set the width of the column and not the max type name width.
      dsTypePane.setPreferredSize(new Dimension(0, 0));
fb.add(dsTypePane, "1, 1, 1, 3"); //$NON-NLS-1$
      fb.add(addRemoveBar,                "1, 5"); //$NON-NLS-1$
      fb.add(dsTypePanel.getPanel(),      "3, 1"); //$NON-NLS-1$
      
      return fb.getPanel();
  }
 
开发者ID:SQLPower,项目名称:sqlpower-library,代码行数:25,代码来源:DataSourceTypeEditor.java


示例7: buildUI

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入依赖的package包/类
private JPanel buildUI(SPServerInfo si) {
    DefaultFormBuilder builder = new DefaultFormBuilder(new FormLayout("pref, 4dlu, max(100dlu; pref):grow")); //$NON-NLS-1$
    
    builder.append(Messages.getString("SPServerInfoPanel.displayNameField"), name = new JTextField(si.getName())); //$NON-NLS-1$
    builder.append(Messages.getString("SPServerInfoPanel.hostField"), host = new JTextField(si.getServerAddress())); //$NON-NLS-1$
    builder.append(Messages.getString("SPServerInfoPanel.portField"), port = new JTextField(String.valueOf(si.getPort()))); //$NON-NLS-1$
    builder.append(Messages.getString("SPServerInfoPanel.pathField"), path = new JTextField(si.getPath())); //$NON-NLS-1$
    builder.append(Messages.getString("SPServerInfoPanel.usernameField"), username = new JTextField(si.getUsername())); //$NON-NLS-1$
    if (si.isPasswordAllowed()) {
    	builder.append(Messages.getString("SPServerInfoPanel.passwordField"), password = new JPasswordField(si.getPassword())); //$NON-NLS-1$
    }
    
    builder.append(testButton = new JButton(Messages.getString("SPServerInfoPanel.testConnectionButton"))); //$NON-NLS-1$
    builder.appendParagraphGapRow();
    
    return builder.getPanel();
}
 
开发者ID:SQLPower,项目名称:sqlpower-library,代码行数:18,代码来源:SPServerInfoPanel.java


示例8: buildUI

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入依赖的package包/类
private JPanel buildUI(SPServerInfo si) {
      DefaultFormBuilder builder = new DefaultFormBuilder(new FormLayout("pref, 4dlu, max(100dlu; pref):grow"));
      
      builder.append("Display Name", name = new JTextField(si.getName()));
      builder.append("Host", host = new JTextField(si.getServerAddress()));
      builder.append("Port", port = new JTextField(String.valueOf(si.getPort())));
      builder.append("Path", path = new JTextField(si.getPath()));
      builder.append("Username", username = new JTextField(si.getUsername()));
      builder.append("Password", password = new JPasswordField(si.getPassword()));
      
      builder.append(testButton = new JButton("Test Connection"));
      this.testButton.addActionListener(new ActionListener() {
	public void actionPerformed(ActionEvent e) {
		lookupServerInfo(true);
	}
});
      
      builder.appendParagraphGapRow();
      
      return builder.getPanel();
  }
 
开发者ID:SQLPower,项目名称:wabit,代码行数:22,代码来源:ServerInfoPanel.java


示例9: createRenamePanel

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入依赖的package包/类
private DataEntryPanel createRenamePanel() {
DefaultFormBuilder builder = 
	new DefaultFormBuilder(new FormLayout("pref, 4dlu, max(100dlu; pref):grow"));
      final JTextField nameField = new JTextField(session.getWorkspace().getName());
builder.append("Name", nameField);
      final JPanel panel = builder.getPanel();
      return new DataEntryPanel() {

	public boolean applyChanges() {
		session.getWorkspace().setName(nameField.getText());
		return true;
	}

	public void discardChanges() {
		//no-op
	}

	public JComponent getPanel() {
		return panel;
	}

	public boolean hasUnsavedChanges() {
		return false;
	}
      };
}
 
开发者ID:SQLPower,项目名称:wabit,代码行数:27,代码来源:RenameWabitServerWorkspaceAction.java


示例10: appendTextToPresentation

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入依赖的package包/类
private void appendTextToPresentation(
   DefaultFormBuilder formBuilder,
   final String text
   ) {
   if(text == null || text.isEmpty()) return;
   /*
    * Subclass JLabel to lie about the with of the component. We understate the preferred 
    * width to avoid that this component influences the width of the columns. It is unclear 
    * why we need to use colspan = 3 here.
    */
   formBuilder.append(
      new JLabel(
         "<html><div style=\"margin-bottom: 8pt; margin-left: 4pt; margin-top: 12pt;"
       + "line-height:1.5; color:#555555\"><i>" + text.replace("\n", "<br/>") 
       + "</i></div></html>"
       ) {
         private static final long serialVersionUID = 1L;
         
         @Override
         public Dimension getPreferredSize() {
            Dimension preferredSize = super.getPreferredSize();
            return new Dimension(10, preferredSize.height);
         }
      }, 3);
}
 
开发者ID:crisis-economics,项目名称:CRISIS,代码行数:26,代码来源:Page_Parameters.java


示例11: appendImageToPresentation

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入依赖的package包/类
private void appendImageToPresentation(
   DefaultFormBuilder formBuilder,
   final String imageFilename
   ) {
   if(imageFilename == null || imageFilename.isEmpty()) return;
   ImageIcon
      icon = null;
   try {
      final ClassLoader
         classLoader = Thread.currentThread().getContextClassLoader();
      final InputStream
         imageStream = classLoader.getResourceAsStream(imageFilename);
      final Image
         image = ImageIO.read(imageStream);
      icon = new ImageIcon(image);
   } catch (final IOException e) {
      icon = new ImageIcon(imageFilename);
   }
   
   final JLabel 
      component = new JLabel(
         "<html><div style=\"margin: 8pt\"></div></html>"
         );
   component.setIcon(icon);
   formBuilder.append(component, 3);
}
 
开发者ID:crisis-economics,项目名称:CRISIS,代码行数:27,代码来源:Page_Parameters.java


示例12: appendHeaderTextToPresentation

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入依赖的package包/类
private void appendHeaderTextToPresentation(
   DefaultFormBuilder formBuilder,
   final String text
   ) {
   if(text == null || text.isEmpty()) return;
   
   formBuilder.append(
      new JLabel(
         "<html><div style=\"margin-bottom: 8pt; margin-left: 4pt; margin-top: 12pt;"
       + " display: block; color:#666666; display: block\"><i>" + text.replace("\n", "<br/>") 
       + "</i></div></html>"
       ) {
       private static final long serialVersionUID = 1L;
       
       @Override
       public Dimension getPreferredSize() {
          Dimension preferredSize = super
             .getPreferredSize();
          return new Dimension(
             10,
             preferredSize.height);
       }
    }, 3);
}
 
开发者ID:crisis-economics,项目名称:CRISIS,代码行数:25,代码来源:Page_Parameters.java


示例13: layoutComponents

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入依赖的package包/类
private void layoutComponents() {
    FormLayout layout = new FormLayout("d, 6dlu, max(d;30dlu):grow");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    builder.append("Port number", portTextField);
    builder.append(httpsPortCheckBox, httpsPortTextField);
    builder.append("Memory init (MB)", memoryInitTextField);
    builder.append("Memory limit (MB)", memoryTextField);
    builder.append("Context path", contextPathComboBox);

    setBorder(Borders.DIALOG_BORDER);

    setLayout(new BorderLayout(12, 12));
    add(builder.getPanel(), BorderLayout.CENTER);
    JPanel buttons = new ButtonBarBuilder()
        .addGlue()
        .addButton(defaultButton)
        .addRelatedGap()
        .addButton(saveButton)
        .addGlue()
        .build();
    add(buttons, BorderLayout.SOUTH);
}
 
开发者ID:FutureSonic,项目名称:FutureSonic-Server,代码行数:23,代码来源:SettingsPanel.java


示例14: layoutComponents

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入依赖的package包/类
private void layoutComponents() {
    JPanel buttons = new ButtonBarBuilder()
        .addGlue()
        .addButton(startButton)
        .addRelatedGap()
        .addButton(stopButton)
        .build();
    FormLayout layout = new FormLayout("right:d, 6dlu, max(d;30dlu):grow");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout, this);
    builder.append("Service status", statusTextField);
    builder.append("", buttons);
    builder.appendParagraphGapRow();
    builder.nextRow();
    builder.append("Started on", startedTextField);
    builder.append("Memory used", memoryTextField);
    builder.append("Error message", errorTextField);
    builder.append("Server address", urlButton);

    setBorder(Borders.DIALOG_BORDER);
}
 
开发者ID:FutureSonic,项目名称:FutureSonic-Server,代码行数:21,代码来源:StatusPanel.java


示例15: layoutComponents

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入依赖的package包/类
@SuppressWarnings("deprecation")
private void layoutComponents() {
       FormLayout layout = new FormLayout("d, 6dlu, max(d;30dlu):grow");
       DefaultFormBuilder builder = new DefaultFormBuilder(layout);
       builder.append("Port number", portTextField);
       builder.append(httpsPortCheckBox, httpsPortTextField);
       builder.append("Memory init (MB)", memoryInitTextField);
       builder.append("Memory limit (MB)", memoryTextField);
       builder.append("Context path", contextPathComboBox);

       setBorder(Borders.DIALOG_BORDER);

       setLayout(new BorderLayout(12, 12));
       add(builder.getPanel(), BorderLayout.CENTER);
       JPanel buttons = new ButtonBarBuilder()
           .addGlue()
           .addButton(defaultButton)
           .addRelatedGap()
           .addButton(saveButton)
           .addGlue()
           .build();
       add(buttons, BorderLayout.SOUTH);
   }
 
开发者ID:MadMarty,项目名称:madsonic-server-5.1,代码行数:24,代码来源:SettingsPanel.java


示例16: init

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入依赖的package包/类
/**
 * Creates all controls and adds them to the frame.
 */
public void init() {
	CardLayout cardLayout = new CardLayout();
	JPanel rightStack = new JPanel(cardLayout);
	String form = "right:max(40dlu;p), 4dlu, 20dlu, 7dlu,right:max(40dlu;p), 4dlu, 80dlu, 7dlu";
	FormLayout rightLayout = new FormLayout(form, "");
	DefaultFormBuilder rightBuilder = new DefaultFormBuilder(rightLayout);
	rightBuilder.setDefaultDialogBorder();
	mControls = getControls();
	for (Iterator i = mControls.iterator(); i.hasNext();) {
		PropertyControl control = (PropertyControl) i.next();
		control.layout(rightBuilder, this);
	}
	// add the last one, too
	rightStack.add(rightBuilder.getPanel(), "testTab");
	add(rightStack, BorderLayout.CENTER);
}
 
开发者ID:iwabuchiken,项目名称:freemind_1.0.0_20140624_214725,代码行数:20,代码来源:StylePatternFrame.java


示例17: initializeMonitorForm

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入依赖的package包/类
public void initializeMonitorForm() {
	DefaultFormBuilder builder = createForm();
	monitorPanel = builder.getPanel();
	mainTabbedPane.add(monitorPanel);

	monitorPathCheckBox = new JCheckBox();
	settingMediator.add(Settings.DO_MONITOR_PATH, monitorPathCheckBox);
	builder.append(monitorPathCheckBox, 4);
	builder.nextLine();

	monitorPathFileChooserPanel = new ExecutableChooserPanel(Constants.DEFAULT_COLUMNS);
	monitorPathFileChooserPanel.setDialogParent(this);
	settingMediator.add(Settings.MONITOR_PATH, monitorPathFileChooserPanel.getTextField());
	monitorPathLabel = builder.append("", monitorPathFileChooserPanel, 3);
	builder.nextLine();

	monitorPathIntervalModel = new SpinnerNumberModel(1, 1, Integer.MAX_VALUE, 30);
	monitorPathIntervalSpinner = new JSpinner(monitorPathIntervalModel);
	monitorPathIntervalSpinner.setEditor(new JSpinner.NumberEditor(monitorPathIntervalSpinner, "# s"));
	monitorPathIntervalLabel = builder.append("", monitorPathIntervalSpinner);
	builder.nextLine();		
	
	monitorPathCheckBox.addItemListener(new EnableListener(monitorPathFileChooserPanel, monitorPathIntervalSpinner));
}
 
开发者ID:Distrotech,项目名称:jhylafax,代码行数:25,代码来源:SettingsDialog.java


示例18: addDocumentsPanel

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入依赖的package包/类
private void addDocumentsPanel()
{
	documentFileChooserPanels = new ArrayList<FileChooserPanel>();
	
	FormLayout layout = new FormLayout("left:max(40dlu;pref), 3dlu, pref:grow", "");
	documentPanelBuilder = new DefaultFormBuilder(layout);
	FileChooserPanel documentFileChooserPanel = new MyFileChooserPanel(DEFAULT_COLUMNS);
	documentFileChooserPanel.getFileChooser().setMultiSelectionEnabled(true);
	documentFileChooserPanels.add(documentFileChooserPanel);
	documentLabel = documentPanelBuilder.append("", documentFileChooserPanel);

	this.builder.appendRow(builder.getLineGapSpec());
	this.builder.nextLine();
	this.builder.appendRow("fill:pref:grow");
	this.builder.append(documentPanelBuilder.getPanel(), 6);

	builder.nextLine();
}
 
开发者ID:Distrotech,项目名称:jhylafax,代码行数:19,代码来源:SendDialog.java


示例19: layoutComponents

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入依赖的package包/类
private void layoutComponents() {
    FormLayout layout = new FormLayout("d, 6dlu, max(d;30dlu):grow");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    builder.append("Port number", portTextField);
    builder.append(httpsPortCheckBox, httpsPortTextField);
    builder.append("Memory limit (MB)", memoryTextField);
    builder.append("Context path", contextPathComboBox);

    setBorder(Borders.DIALOG_BORDER);

    setLayout(new BorderLayout(12, 12));
    add(builder.getPanel(), BorderLayout.CENTER);
    add(ButtonBarFactory.buildCenteredBar(defaultButton, saveButton), BorderLayout.SOUTH);
}
 
开发者ID:sindremehus,项目名称:subsonic,代码行数:15,代码来源:SettingsPanel.java


示例20: layoutComponents

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入依赖的package包/类
private void layoutComponents() {
    FormLayout layout = new FormLayout("right:d, 6dlu, max(d;30dlu):grow");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout, this);
    builder.append("Started on", startedTextField);
    builder.append("Memory used", memoryTextField);
    builder.append("Error message", errorTextField);
    builder.append("Server address", urlButton);

    setBorder(Borders.DIALOG_BORDER);
}
 
开发者ID:sindremehus,项目名称:subsonic,代码行数:11,代码来源:StatusPanel.java



注:本文中的com.jgoodies.forms.builder.DefaultFormBuilder类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Repairable类代码示例发布时间:2022-05-21
下一篇:
Java HandshakeTimeoutException类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap