当前位置: 首页>>代码示例>>Java>>正文


Java DefaultFormBuilder.getPanel方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: 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

示例8: 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

示例9: createComponent

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入方法依赖的package包/类
@Override
public JComponent createComponent() {
    DefaultFormBuilder builder = new DefaultFormBuilder(new FormLayout(""));
    builder.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    builder.appendColumn("right:pref");
    builder.appendColumn("3dlu");
    builder.appendColumn("fill:max(pref; 100px)");
    builder.append("lat/lon order:", createOrderComboBox());
    return builder.getPanel();
}
 
开发者ID:dnltsk,项目名称:intellij-geocoding-plugin,代码行数:11,代码来源:GeocodingConfigurable.java

示例10: getOperatorPropertyPanel

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入方法依赖的package包/类
public JPanel getOperatorPropertyPanel(AtsOperator op) {
    FormLayout lm = new FormLayout("right:pref:grow, 2dlu, fill:150dlu");
    DefaultFormBuilder builder = new DefaultFormBuilder(lm);
    builder.setDefaultDialogBorder();

    setup(op, builder);

    // loop throough all parameters and attach them
    for (int i = 0; i < sortedKeys_.size(); i++) {
        String paramName = sortedKeys_.get(i);
        Parameter param = getParam(paramName);

        if (param instanceof AtsInteger)
            addInteger(builder, paramName, (AtsInteger) param);
        if (param instanceof AtsEnumeration)
            addEnumeration(builder, paramName, (AtsEnumeration) param);
        if (param instanceof AtsColor)
            addColor(builder, paramName, (AtsColor) param);
        if (param instanceof AtsText)
            addText(builder, paramName, (AtsText) param);
        if (param instanceof AtsPosition2D)
            addPosition(builder, paramName, (AtsPosition2D) param);
        if (param instanceof AtsBoolean)
            addBoolean(builder, paramName, (AtsBoolean) param);
    }

    JPanel result = builder.getPanel();
    JScrollPane pane = new JScrollPane(result, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
            JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
    JPanel panel = new JPanel(new BorderLayout());
    panel.add(pane);
    return panel;
}
 
开发者ID:jdiemke,项目名称:XPTS,代码行数:34,代码来源:PropertyContainer.java

示例11: buildUI

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入方法依赖的package包/类
private JPanel buildUI() {
	DefaultFormBuilder builder = new DefaultFormBuilder(new FormLayout("pref"));
	builder.setDefaultDialogBorder();
	builder.append(new JLabel("Copy all properties from which data source type?"));
	builder.append(dsTypesComboBox);
	builder.append(new JLabel("Note: This will overwrite all current settings on " + dsType.getName() + "."));
	return builder.getPanel();
}
 
开发者ID:SQLPower,项目名称:sqlpower-library,代码行数:9,代码来源:DataSourceTypeCopyPropertiesPanel.java

示例12: buildUI

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入方法依赖的package包/类
private JPanel buildUI() {
	DefaultFormBuilder builder = new DefaultFormBuilder(new FormLayout("pref"));
	builder.setDefaultDialogBorder();
	
	builder.append("New Data Source Type");
	builder.append(blankOption);
	builder.append(copyOption);
	builder.append(existingDSTypes);
	
	return builder.getPanel();
}
 
开发者ID:SQLPower,项目名称:sqlpower-library,代码行数:12,代码来源:NewDataSourceTypePanel.java

示例13: CommonWordsFinderPanel

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入方法依赖的package包/类
public CommonWordsFinderPanel(final MatchMakerSwingSession session, SPDataSource defaultConnection) {
    this.session = session;
    DataSourceCollection dataSources = session.getContext().getPlDotIni();
    final JComboBox connectionChooser = new JComboBox(new ConnectionComboBoxModel(dataSources));
    connectionChooser.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            try {
                JDBCDataSource ds = (JDBCDataSource) connectionChooser.getSelectedItem();

                // Gets the session's shared SQLDatabase for this data source
                SQLDatabase db = session.getDatabase(ds);
                
                // XXX don't know if this is going to reparent the shared database in a bad way!
                SQLObjectRoot root = new SQLObjectRoot();
                
                root.addChild(db);
                DBTreeModel model = new DBTreeModel(root);
                columnPicker.setModel(model);
            } catch (SQLObjectException ex) {
                throw new RuntimeException(ex);
            }
        }
    });
    columnPicker = new JTree();

    DefaultFormBuilder builder = new DefaultFormBuilder(
            new FormLayout("pref:grow"));
    builder.append("Choose a column to analyze for frequently-occurring words:");
    builder.append(connectionChooser);
    builder.append(new JScrollPane(columnPicker));

    JDefaultButton okButton = new JDefaultButton("Start");
    JButton cancelButton = new JButton("Cancel");
    builder.append(ButtonBarFactory.buildOKCancelBar(okButton, cancelButton));
    panel = builder.getPanel();
}
 
开发者ID:SQLPower,项目名称:power-matchmaker,代码行数:37,代码来源:CommonWordsFinderPanel.java

示例14: buildChartPrefsPanel

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入方法依赖的package包/类
/**
 * Subroutine of {@link #buildUI()}. Creates the form that appears to the
 * right of the JFreeChart preview.
 */
private Component buildChartPrefsPanel() {
    DefaultFormBuilder builder = new DefaultFormBuilder(
            new FormLayout("70dlu, 3dlu, 90dlu"),
            logger.isDebugEnabled() ? new FormDebugPanel() : new JPanel());

    builder.append("Legend Postion", legendPositionComboBox);
    builder.nextLine();
    
    builder.append(yaxisNameLabel, yaxisNameField);
    builder.nextLine();
    
    builder.append(xaxisNameLabel, xaxisNameField);
    builder.nextLine();

    builder.append(xaxisLabelRotationLabel, xaxisLabelRotationSlider);
    builder.nextLine();
    
	builder.append(this.xAxisAutoLabel, this.xAxisAuto);
	builder.append(this.xAxisMaxLabel, this.xAxisMax);
	builder.append(this.xAxisMinLabel, this.xAxisMin);
	builder.nextLine();
    
	builder.append(this.yAxisAutoLabel, this.yAxisAuto);
	builder.append(this.yAxisMaxLabel, this.yAxisMax);
	builder.append(this.yAxisMinLabel, this.yAxisMin);
	builder.nextLine();
	
    builder.append("Gratuitous Animation", gratuitousAnimationCheckbox);
    
    return builder.getPanel();
}
 
开发者ID:SQLPower,项目名称:wabit,代码行数:36,代码来源:ChartPanel.java

示例15: initializeJobForm

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入方法依赖的package包/类
private void initializeJobForm() {
	DefaultFormBuilder builder = createForm();
	jobPanel = builder.getPanel();
	mainTabbedPane.add(jobPanel);
	
	jobParameterPanel = new JobPanel(false);
	builder.append(jobParameterPanel, 5);
}
 
开发者ID:Distrotech,项目名称:jhylafax,代码行数:9,代码来源:SettingsDialog.java


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