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


Java DefaultFormBuilder.setDefaultDialogBorder方法代码示例

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


在下文中一共展示了DefaultFormBuilder.setDefaultDialogBorder方法的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: 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

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

示例4: setContents

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入方法依赖的package包/类
void setContents() {
	DefaultFormBuilder builder = new DefaultFormBuilder(
			new FormLayout("pref, 4dlu, fill:pref:grow"),
			this
	);

	ColorSetManager csm = method.getVisualization()
	.getManager().getColorSetManager();
	ColorSetChooser csChooser = new ColorSetChooser(csm, method.getGexManager());
	colorSetCombo = csChooser.getColorSetCombo();
	colorSetCombo.setActionCommand(ACTION_COMBO);
	colorSetCombo.addActionListener(this);
	colorSetCombo.getModel().setSelectedItem(cs.getColorSet());

	imageCheck = new JCheckBox(ACTION_IMG);
	imageCheck.setActionCommand(ACTION_IMG);
	imageCheck.addActionListener(this);
	imageCheck.setSelected(cs.getURL() != null);

	imagePanel = new JPanel();
	imagePanel.setBorder(BorderFactory.createTitledBorder(
			BorderFactory.createEtchedBorder(), "Image settings"
	));

	builder.setDefaultDialogBorder();
	builder.append("Color set:", csChooser);
	builder.nextLine();
	builder.append(imageCheck, 3);
	builder.nextLine();
	builder.append(imagePanel, 3);

	refreshImagePanel();
}
 
开发者ID:PathVisio,项目名称:pathvisio,代码行数:34,代码来源:ColorByExpressionPanel.java

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

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

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

示例8: buildUI

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入方法依赖的package包/类
private void buildUI() {
		//This panel is only here to center the icons panel in the middle of the dialog
		
		JPanel iconsPanel = new JPanel(new MigLayout("ins n 0 n 0", "[center, grow]"));
		iconsPanel.setOpaque(false);
		
		JPanel generateLogoPanel = LogoLayout.generateLogoPanel();
		generateLogoPanel.setOpaque(false);
		iconsPanel.add(generateLogoPanel, "wrap, alignx center");

		iconsPanel.add(buildButtonsPanel(), "");
		
		new JButton(new AbstractAction("View Tutorials") {
			public void actionPerformed(ActionEvent e) {
				// TODO Link to a website with demos of Wabit.
			}
		});
//		bottomPanelBuilder.append(tutorialButton);
		//Temporary spacer label until tutorials exist on the website.
		
		
		DefaultFormBuilder bottomPanelBuilder = new DefaultFormBuilder(new FormLayout("pref, 4dlu, pref, 4dlu:grow, pref"));
		bottomPanelBuilder.setDefaultDialogBorder();
		JButton helpButton = new JButton(new HelpAction(context.getFrame()));
		bottomPanelBuilder.append(helpButton);
		
		mainPanel = new FurryPanel(new BorderLayout());
		mainPanel.add(iconsPanel, BorderLayout.CENTER);
		mainPanel.add(bottomPanelBuilder.getPanel(), BorderLayout.SOUTH);
		
		mainScrollPane = new JScrollPane(mainPanel);
	}
 
开发者ID:SQLPower,项目名称:wabit,代码行数:33,代码来源:WabitWelcomeScreen.java

示例9: EditContactDialog

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入方法依赖的package包/类
public EditContactDialog(JFrame owner, SimpleContact contact) {
	super(owner);

	setApplyOnEnter(true);
	
	FormLayout layout = new FormLayout("left:max(40dlu;pref), 3dlu, pref:grow", "");
	DefaultFormBuilder builder = new DefaultFormBuilder(layout);
	builder.setDefaultDialogBorder();
	setMainComponent(builder.getPanel());
	
	firstNameTextField = new JTextField(20);
	firstNameLabel = builder.append("", firstNameTextField);
	builder.nextLine();

	lastNameTextField = new JTextField(20);
	lastNameLabel = builder.append("", lastNameTextField);
	builder.nextLine();

	companyTextField = new JTextField(20);
	companyLabel = builder.append("", companyTextField);
	builder.nextLine();

	faxNumberTextField = new JTextField(20);
	faxNumberLabel = builder.append("", faxNumberTextField);
	builder.nextLine();

	setContact(contact);
	revert();
	
	updateLabels();
	pack();
}
 
开发者ID:Distrotech,项目名称:jhylafax,代码行数:33,代码来源:EditContactDialog.java

示例10: AbstractFaxDialog

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入方法依赖的package包/类
public AbstractFaxDialog(JFrame owner) {
	super(owner, BUTTON_OKAY | BUTTON_CANCEL);

	FormLayout layout = new FormLayout("left:max(40dlu;pref), 3dlu, pref, 3dlu, min, min:grow", "");
	builder = new DefaultFormBuilder(layout);
	builder.setDefaultDialogBorder();
	setMainComponent(builder.getPanel());
	
	parameterAction = new ParameterDialogAction();
	getButtonPanel().add(Builder.createButton(parameterAction), 0);
}
 
开发者ID:Distrotech,项目名称:jhylafax,代码行数:12,代码来源:AbstractFaxDialog.java

示例11: FontChooser

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入方法依赖的package包/类
public FontChooser(Frame frame, Component locationComp, Font font) {
	super(frame, "Select font", locationComp, true, true);
	this.font = font;
	if(font == null) {
		font = UIManager.getFont("Label.font");
	}

	fontCombo = new JComboBox(
			GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames()
	);
	fontCombo.setRenderer(new FontNameRenderer());
	fontCombo.setSelectedItem(font.getFamily());

	sizeCombo = new JComboBox(
			new Integer[] {
					4, 6, 7, 8, 10, 11, 12,
					14, 16, 18, 20, 24,36,48
			}
	);
	sizeCombo.setEditable(true);

	((JTextField)sizeCombo.getEditor().getEditorComponent()).setDocument(
			new IntegerDocument()
	);
	sizeCombo.setSelectedItem(font.getSize() + "");

	boldCheck = new JCheckBox();
	boldCheck.setSelected(font.isBold());
	italicCheck = new JCheckBox();
	italicCheck.setSelected(font.isItalic());

	DefaultFormBuilder builder = new DefaultFormBuilder(new FormLayout(
			"pref, 8dlu, pref:grow", ""
	));
	builder.setDefaultDialogBorder();
	builder.append("Font:", fontCombo);
	builder.nextLine();
	builder.append("Size:", sizeCombo);
	builder.nextLine();
	builder.append("Bold:", boldCheck);
	builder.nextLine();
	builder.append("Italic:", italicCheck);

	setDialogComponent(builder.getPanel());
	pack();
}
 
开发者ID:PathVisio,项目名称:pathvisio,代码行数:47,代码来源:FontChooser.java

示例12: AtsPropertyContainer

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入方法依赖的package包/类
public AtsPropertyContainer() {

        FormLayout lm = new FormLayout("right:pref:grow, 2dlu, fill:150dlu");
        builder = new DefaultFormBuilder(lm);// , new FormDebugPanel());
        builder.setDefaultDialogBorder();
    }
 
开发者ID:jdiemke,项目名称:XPTS,代码行数:7,代码来源:AtsPropertyContainer.java

示例13: createQueryPanel

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入方法依赖的package包/类
/**
* Builds the UI of the {@link SQLQueryUIComponents}. If you just want an
* easy way to build a full-featured query UI and don't want to customize
* its internals, you have come to the right place. This also allows a SQL
* string to initialize the query UI with.
* 
* @param swRegistry
*            The registry with which all background tasks will be
*            registered. This argument must not be null.
* @param dsCollection
*            The collection of data sources that will be available for
*            querying from the UI. This argument must not be null.
* 
* @param ds
*            The data source that the initial query will be executed on.
*            This data source must be contained in the dsCollection and not
*            null for the query to be executed. If the data source is null
*            then the query will not be executed.
* 
* @param initialSQL
*            The string that will be executed immediately when the query
*            tool is shown. If this is null then no query will be executed.
*/
  public static JComponent createQueryPanel(SwingWorkerRegistry swRegistry, DataSourceCollection dsCollection, SQLDatabaseMapping mapping, Window owner, SQLDatabase db, String initialSQL) {
      
      JPanel defaultQueryPanel = new JPanel();
      SQLQueryUIComponents queryParts = new SQLQueryUIComponents(swRegistry, dsCollection, mapping, defaultQueryPanel);
      queryParts.addWindowListener(owner);
      JToolBar toolbar = new JToolBar();
      toolbar.setFloatable(false);
      toolbar.add(queryParts.getPrevQueryButton());
      toolbar.add(queryParts.getNextQueryButton());
      toolbar.addSeparator();
      toolbar.add(queryParts.getExecuteButton());
      toolbar.add(queryParts.getStopButton());
      toolbar.add(queryParts.getClearButton());
      toolbar.addSeparator();
      toolbar.add(queryParts.getAutoCommitToggleButton());
      toolbar.add(queryParts.getCommitButton());
      toolbar.add(queryParts.getRollbackButton());
      toolbar.addSeparator();
      toolbar.add(queryParts.getUndoButton());
      toolbar.add(queryParts.getRedoButton());
      
      FormLayout textAreaLayout = new FormLayout(
              "pref:grow, 10dlu, pref, 10dlu, pref, 10dlu, pref"
              , "pref, pref, fill:max(100dlu;pref):grow");
      DefaultFormBuilder textAreaBuilder = new DefaultFormBuilder(textAreaLayout, defaultQueryPanel);
      textAreaBuilder.setDefaultDialogBorder();
      textAreaBuilder.append(toolbar, 7);
      textAreaBuilder.nextLine();
      textAreaBuilder.append(queryParts.getDatabaseComboBox());
      textAreaBuilder.append(queryParts.getDbcsManagerButton());
      textAreaBuilder.append(Messages.getString("SQLQuery.rowLimit"));
      JSpinner rowlimitSpinner = queryParts.getRowLimitSpinner();
      rowlimitSpinner.setValue(new Integer(1000));
      textAreaBuilder.append(rowlimitSpinner);
      textAreaBuilder.nextLine();
      textAreaBuilder.append(new RTextScrollPane(queryParts.getQueryArea(), true), 7);
      
      
      JSplitPane queryPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
      
      queryPane.add(defaultQueryPanel, JSplitPane.TOP);
     
 
      queryPane.add(queryParts.getResultTabPane(), JSplitPane.BOTTOM);
      
      if (db != null && initialSQL != null && dsCollection.getConnections().contains(db.getDataSource())) {
      	queryParts.getDatabaseComboBox().setSelectedItem(db.getDataSource());
      	queryParts.getQueryArea().setText(initialSQL);
      	queryParts.executeQuery(initialSQL);
      }
      
      return queryPane;

  }
 
开发者ID:SQLPower,项目名称:sqlpower-library,代码行数:78,代码来源:SQLQueryUIComponents.java

示例14: ModalDialogListUserPrompter

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入方法依赖的package包/类
public ModalDialogListUserPrompter(JFrame parentFrame, String question, List<T> responses, T defaultResponse) {
	this.parentFrame = parentFrame;
	this.defaultResponse = defaultResponse;
       applyToAll = new JCheckBox(Messages.getString("ModalDialogUserPrompter.applyToAllOption")); //$NON-NLS-1$
       
       confirmDialog = new JDialog(parentFrame);
       
       // FIXME the title needs to be configurable and/or set itself based on prompt type
       confirmDialog.setTitle(""); //$NON-NLS-1$
       
       // this is just filled with the message pattern template to help with sizing
       questionField = new JTextArea(question);
       questionField.setEditable(false);
       questionField.setBackground(null);
       
       questionFormat = new MessageFormat(question);
       
       JPanel confirmPanel = new JPanel();
       FormLayout formLayout = new FormLayout("pref:grow" //$NON-NLS-1$
                                               , ""); //$NON-NLS-1$
       
       optionBox = new JComboBox();
       for (T item : responses) {
       	optionBox.addItem(item);
       }
       
       optionBox.setSelectedItem(defaultResponse);
       DefaultFormBuilder builder = new DefaultFormBuilder(formLayout, confirmPanel);
       builder.setDefaultDialogBorder();
       
       builder.append(questionField);

       builder.nextLine();
       builder.append(optionBox);
       
       builder.nextLine();
       ButtonBarBuilder buttonBar = new ButtonBarBuilder();
       buttonBar.addGlue();
       JButton okButton = new JButton();
       okButton.setText("Ok");
       buttonBar.addGridded(okButton);
       buttonBar.addGlue();
       
       okButton.addActionListener(new ActionListener() {
		@SuppressWarnings("unchecked")
		public void actionPerformed(ActionEvent e) {
			responseButton = UserPromptResponse.OK;
               response = (T) optionBox.getSelectedItem();
               confirmDialog.dispose();
           }
       });
       builder.append(""); //$NON-NLS-1$
       builder.append(buttonBar.getPanel());
       builder.nextLine();
       
       builder.append(""); //$NON-NLS-1$
       builder.append(applyToAll);
       
       okButton.requestFocusInWindow();

       confirmDialog.setModal(true);
       confirmDialog.add(builder.getPanel());
}
 
开发者ID:SQLPower,项目名称:sqlpower-library,代码行数:64,代码来源:ModalDialogListUserPrompter.java

示例15: actionPerformed

import com.jgoodies.forms.builder.DefaultFormBuilder; //导入方法依赖的package包/类
public void actionPerformed(ActionEvent e) {
 
    if (getSelectedServerInfo() != null) {
       
        String name = JOptionPane.showInputDialog(dialogOwner, "Please specify the name of your project", "", JOptionPane.QUESTION_MESSAGE);
        
        if (name != null) {
            DefaultListModel model = (DefaultListModel) projects.getModel();
            for (int i = 0; i < model.size(); i++) {
                if (((ProjectLocation) model.getElementAt(i)).getName().trim().equalsIgnoreCase(name.trim())) {
                    JOptionPane.showMessageDialog(dialogOwner, "A project called \"" + name + "\" already exists. Please use a different name.", "Duplicate project name", JOptionPane.ERROR_MESSAGE);
                    return;
                }
            }

            try {
                Window frame = SwingUtilities.getWindowAncestor(dialogOwner);
                
                JLabel messageLabel = new JLabel("Creating New Project");
                JProgressBar progressBar = new JProgressBar();
                progressBar.setIndeterminate(true);
                
                final JDialog dialog = new JDialog(frame, "Creating New Project");
                
                DefaultFormBuilder builder = new DefaultFormBuilder(new FormLayout("pref:grow, 5dlu, pref"));
                builder.setDefaultDialogBorder();
                builder.append(messageLabel, 3);
                builder.nextLine();
                builder.append(progressBar, 3);
                dialog.add(builder.getPanel());
                
                dialog.setSize(new Dimension(300,90));
                dialog.setLocationRelativeTo(frame);
                dialog.setAlwaysOnTop(true);
                dialog.setVisible(true);
                
                ClientSideSessionUtils.createNewServerSession(getSelectedServerInfo(), name, cookieStore, upf);
 
                dialog.dispose();
                
            } catch (Exception ex) {
                throw new RuntimeException("Unable to create new project", ex);
            }

            refreshInfoList();
        }
    }
}
 
开发者ID:SQLPower,项目名称:sqlpower-library,代码行数:49,代码来源:ServerProjectsManagerPanel.java


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