List of usage examples for com.jgoodies.forms.layout CellConstraints xyw
public CellConstraints xyw(int col, int row, int colSpan)
Examples:
cc.xyw(1, 3, 7); cc.xyw(1, 3, 2);
From source file:de.dal33t.powerfolder.ui.wizard.TellFriendPanel.java
License:Open Source License
protected JComponent buildContent() { FormLayout layout = new FormLayout("pref, 7dlu, pref, 7dlu, pref, 7dlu, pref", "pref, 30dlu, pref"); PanelBuilder builder = new PanelBuilder(layout); builder.setBorder(createFewContentBorder()); CellConstraints cc = new CellConstraints(); builder.add(fbLabel.getUIComponent(), cc.xy(1, 1)); builder.add(twitterLabel.getUIComponent(), cc.xy(3, 1)); builder.add(linkedInLabel.getUIComponent(), cc.xy(5, 1)); builder.add(emailLabel.getUIComponent(), cc.xy(7, 1)); builder.add(infoLabel.getUIComponent(), cc.xyw(1, 3, 7)); return builder.getPanel(); }
From source file:de.dal33t.powerfolder.ui.wizard.TypicalFolderSetupPanel.java
License:Open Source License
protected JPanel buildContent() { FormLayout layout = new FormLayout("right:pref, 3dlu, 140dlu, 3dlu, 15dlu, pref:grow", "pref, 6dlu, pref, 6dlu, pref, 6dlu, pref"); PanelBuilder builder = new PanelBuilder(layout); builder.setBorder(createFewContentBorder()); CellConstraints cc = new CellConstraints(); builder.addLabel(Translation.getTranslation("general.folder"), cc.xy(1, 1)); builder.add(folderTextField, cc.xy(3, 1)); builder.add(//ww w . j a v a 2 s .c o m new JLabel(Translation.getTranslation("wizard.multi_online_storage_setup.local_folder_location")), cc.xy(1, 3)); builder.add(localFolderField, cc.xy(3, 3)); if (PreferencesEntry.EXPERT_MODE.getValueBoolean(getController())) { builder.add(new JLabel(Translation.getTranslation("general.transfer_mode")), cc.xy(1, 5)); JPanel p = (JPanel) syncProfileSelectorPanel.getUIComponent(); p.setOpaque(false); builder.add(p, cc.xyw(3, 5, 4)); } return builder.getPanel(); }
From source file:de.dfki.dmas.owls2wsdl.gui.ProjectDetailPanel.java
License:Open Source License
private JScrollPane buildServiceDependenciesInfoTab(boolean debugmode) { JPanel ontInfoPanel = new JPanel(); JPanel debugPanel = new FormDebugPanel(); FormLayout layout = new FormLayout( "fill:40dlu, right:pref, 4dlu, pref, 10dlu:grow, right:pref, 4dlu, pref, 10dlu", "pref, 3dlu, pref, 5dlu," + "pref, 3dlu, pref, 3dlu, pref, 3dlu, pref"); PanelBuilder builder = null;/*from www . j a v a 2 s .c o m*/ if (debugmode) builder = new PanelBuilder(layout, debugPanel); else builder = new PanelBuilder(layout, ontInfoPanel); builder.setDefaultDialogBorder(); CellConstraints cc = new CellConstraints(); builder.addSeparator("Service dependencies and missing types", cc.xyw(1, 1, 9)); builder.add(new JScrollPane(serviceDependencyTypesTable), cc.xyw(1, 3, 9)); builder.addSeparator("Project, Datatype summary", cc.xyw(1, 5, 9)); builder.add(new JLabel("Total count"), cc.xy(2, 7)); builder.add(datatypesTotalCountField, cc.xy(4, 7)); builder.add(new JLabel("Service dependencies count"), cc.xy(2, 9)); builder.add(serviceDependencyTypesCountField, cc.xy(4, 9)); builder.add(new JLabel("Missing types count"), cc.xy(6, 9)); builder.add(serviceMissingTypesCountField, cc.xy(8, 9)); if (debugmode) { FormDebugUtils.dumpAll(this); return new JScrollPane(debugPanel); } else { return new JScrollPane(ontInfoPanel); } }
From source file:de.dfki.dmas.owls2wsdl.gui.RegisteredDatatypeDetailPanel.java
License:Open Source License
/** * Builds the panel. Initializes and configures components first, then * creates a FormLayout, configures the layout, creates a builder, sets a * border, and finally adds the components. * /*from ww w .ja v a 2s .c o m*/ * @return the built panel */ private void buildPanel() { this.setBorder(Borders.DIALOG_BORDER); this.setMinimumSize(new Dimension(400, 400)); // fill:pref:grow FormLayout layout = new FormLayout("right:pref, 10px, fill:pref:grow, 2dlu, right:pref", "p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 6dlu, p, 6dlu, p"); this.setLayout(layout); CellConstraints cc = new CellConstraints(); this.add(DefaultComponentFactory.getInstance().createSeparator(ResourceManager.getString("type.sep.info")), cc.xyw(1, 1, 5)); // this.add(new JLabel("Name") , cc.xy ( 1, 3)); // this.add(datatypeLocalNameField , cc.xy ( 3, 3)); this.add(new JLabel("OWL URI"), cc.xy(1, 3)); this.add(datatypeUrlField, cc.xyw(3, 3, 3)); this.add(new JLabel("RDF Type", SwingConstants.RIGHT), cc.xy(1, 5)); this.add(datatypeRdfTypeField, cc.xy(3, 5)); JPanel buttonPanel4RdfType = new JPanel(); buttonPanel4RdfType.add(lockRdfTypeButton); buttonPanel4RdfType.add(unlockRdfTypeButton); this.add(buttonPanel4RdfType, cc.xy(5, 5)); this.add(new JLabel("XSD Type", SwingConstants.RIGHT), cc.xy(1, 7)); this.add(datatypeXsdTypeField, cc.xy(3, 7)); JPanel buttonPanel4XsdType = new JPanel(); // buttonPanel4XsdType.setBackground(Color.BLUE); buttonPanel4XsdType.add(saveXsdTypeButton); buttonPanel4XsdType.add(removeXsdTypeButton); this.add(buttonPanel4XsdType, cc.xy(5, 7)); dtTabs = new JTabbedPane(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT); dtTabs.add("Elements", new JScrollPane(datatypeElementTable)); // datatypeElementList dtTabs.add("Description", new JScrollPane(datatypeDescriptionField)); dtTabs.add("Super Classes", new JScrollPane(datatypeParentList)); dtTabs.add("Intersection Classes", new JScrollPane(datatypeIntersectionList)); dtTabs.add("OWL Model", new JScrollPane(datatypeMetaElementList)); dtTabs.add("Individuals", new JScrollPane(datatypeRangeList)); // dtTabs.add("Exceptions", new JScrollPane(exceptionTextArea)); // // dynamic // dtTabs.setEnabledAt(6, false); // dtTabs.setIconAt(6, new javax.swing.ImageIcon(this.imageFailed)); dtTabs.addChangeListener(this); this.add(dtTabs, cc.xyw(1, 9, 5)); // this.add(buildElementInformationPanel(), cc.xyw( 1,11, 5)); this.add(DefaultComponentFactory.getInstance().createSeparator(ResourceManager.getString("type.sep.range")), cc.xyw(1, 11, 5)); this.add(restrictionRangeScrollPane, cc.xyw(1, 13, 5)); }
From source file:de.dfki.dmas.owls2wsdl.gui.ServiceDetailPanel.java
License:Open Source License
/** * Builds the panel. Initializes and configures components first, then * creates a FormLayout, configures the layout, creates a builder, sets a * border, and finally adds the components. *//*from w w w. j a v a 2s . com*/ public void buildPanel() { this.setBorder(Borders.DIALOG_BORDER); FormLayout layout = new FormLayout("right:pref, 10px, left:0:grow, 10px, right:pref, 10px, fill:pref:grow", "p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 6dlu, p, 3dlu, p"); this.setLayout(layout); CellConstraints cc = new CellConstraints(); this.add(DefaultComponentFactory.getInstance() .createSeparator(ResourceManager.getString("service.sep.info")), cc.xyw(1, 1, 7)); this.add(new JLabel("ID"), cc.xy(1, 3)); this.add(serviceIdField, cc.xyw(3, 3, 5)); this.add(new JLabel("Name"), cc.xy(1, 5)); this.add(serviceNameField, cc.xy(3, 5)); this.add(new JLabel("OWL-S Version"), cc.xy(5, 5)); this.add(serviceVersionField, cc.xy(7, 5)); this.add(new JLabel("Filename"), cc.xy(1, 7)); this.add(serviceFilenameField, cc.xyw(3, 7, 5)); this.add(new JLabel("Basename"), cc.xy(1, 9)); this.add(serviceBaseNameField, cc.xyw(3, 9, 5)); this.add(DefaultComponentFactory.getInstance() .createSeparator(ResourceManager.getString("service.sep.interface")), cc.xyw(1, 11, 7)); JTabbedPane tabs = new JTabbedPane(JTabbedPane.TOP, JTabbedPane.WRAP_TAB_LAYOUT); tabs.add("Parameter", new JScrollPane(serviceParameterTable)); tabs.add("Description", new JScrollPane(serviceDescriptionField)); tabs.add("Namespace", new JScrollPane(serviceNamespaceList)); tabs.add("Imports", new JScrollPane(serviceImportedFilesList)); this.add(tabs, cc.xyw(1, 13, 7)); }
From source file:de.lazyzero.kkMulticopterFlashTool.gui.widgets.FirmwareSettings.KKQuadSettings.java
License:Open Source License
@Override protected JPanel addEEpromDataItems() { readEEprom(this); JPanel settingsPanel = new JPanel(); LinkedHashMap<Short, String> dataMapping = new LinkedHashMap<Short, String>(); dataMapping.put((short) 127, "true"); dataMapping.put((short) 255, "false"); wait4EEprom();//from w ww .j a va 2s . c om // create the CellContraints CellConstraints cc = new CellConstraints(); // create the Layout for Panel this String panelColumns = "fill:pref:grow,3dlu,fill:pref:grow,3dlu,fill:pref:grow"; String panelRows = "pref,3dlu,pref"; FormLayout panelLayout = new FormLayout(panelColumns, panelRows); settingsPanel.setLayout(panelLayout); if (eeprom != null) { rollGyro = new EEpromBooleanItem(eeprom, "Roll gyro", 0, 1, EEpromBooleanItem.BOOLEAN, dataMapping, "inverted"); nickGyro = new EEpromBooleanItem(eeprom, "Nick gyro", 1, 1, EEpromBooleanItem.BOOLEAN, dataMapping, "inverted"); yawGyro = new EEpromBooleanItem(eeprom, "Yaw gyro", 2, 1, EEpromBooleanItem.BOOLEAN, dataMapping, "inverted"); potDirection = new EEpromBooleanItem(eeprom, "Pot direction", 3, 1, EEpromBooleanItem.BOOLEAN, dataMapping, "inverted"); settingsPanel.add(new EEpromItemPanel(rollGyro), cc.xy(1, 1)); settingsPanel.add(new EEpromItemPanel(nickGyro), cc.xy(3, 1)); settingsPanel.add(new EEpromItemPanel(yawGyro), cc.xy(5, 1)); settingsPanel.add(new EEpromItemPanel(potDirection), cc.xy(1, 3)); } else { settingsPanel.add(new JLabel(_("EEPromSettingsPanel.failed2read")), cc.xyw(1, 1, 5)); } return settingsPanel; }
From source file:de.xplib.xdbm.ui.dialog.AbstractXPathQueryDialog.java
License:Open Source License
/** * //from www . jav a 2 s .c o m */ private void initUI() { this.contextPath.setEditable(false); this.contextPath.setText(this.getPath(this.target)); this.xpathArea.setTokenMarker(new XPathTokenMarker()); this.xpathArea.setBorder(BorderFactory.createEtchedBorder()); this.xpathArea.setDocument(new SyntaxDocument()); FormLayout layout = new FormLayout("right:pref, 3dlu, pref, 3dlu, pref", "p, 3dlu, top:80dlu, 3dlu, p, 9dlu, p"); layout.setColumnGroups(new int[][] { { 3, 5 } }); PanelBuilder builder = new PanelBuilder(layout); builder.setDefaultDialogBorder(); CellConstraints cc = new CellConstraints(); builder.add(this.contextLabel, cc.xy(1, 1)); builder.add(this.contextPath, cc.xyw(3, 1, 3)); builder.add(this.xpathLabel, cc.xy(1, 3)); builder.add(this.xpathArea, cc.xyw(3, 3, 3)); builder.addSeparator("", cc.xyw(1, 5, 5)); builder.add(new JButton(new CancelDialogAction(this)), cc.xy(3, 7)); builder.add(new JButton(new CloseDialogWrapperAction(action, this)), cc.xy(5, 7)); this.setContentPane(builder.getPanel()); }
From source file:de.xplib.xdbm.ui.dialog.ExecuteProcessDialog.java
License:Open Source License
/** * //from www . ja v a 2 s .c o m */ private void initUI() { this.jpBar.setIndeterminate(true); FormLayout layout = new FormLayout("90px, 3dlu, 90px, 3dlu, 90px", "20dlu, 3dlu, p, 3dlu, p, 9dlu, p"); layout.setColumnGroups(new int[][] { { 1, 3, 5 } }); PanelBuilder builder = new PanelBuilder(layout); builder.setDefaultDialogBorder(); CellConstraints cc = new CellConstraints(); builder.add(this.message, cc.xyw(1, 1, 5)); builder.add(this.jpBar, cc.xyw(3, 3, 3)); this.setContentPane(builder.getPanel()); }
From source file:de.xplib.xdbm.ui.dialog.FirstStartSetup.java
License:Open Source License
/** * /*w w w . j a va2s . c o m*/ */ private void initUI() { this.getContentPane().setLayout(this.mainLayout); Locale l = this.config.getLocale(); Object[] args = new Object[0]; this.jfField.addFileFilter(JFileField.JAR_FILE_FILTER); this.jfField.setFileSelectionMode(JFileChooser.FILES_ONLY); this.jfField.addSelectListener(new FileSelectListener()); this.jfField.addDocumentListener(new EnableButtonListener()); this.jfField.setToolTipText(MessageManager.getText("setup.dialog.jarfile.tooltip", "text", args, l)); this.jtfClass.getDocument().addDocumentListener(new EnableButtonListener()); this.jtfClass.setToolTipText(MessageManager.getText("setup.dialog.class.tooltip", "text", args, l)); this.jtfDbURI.setToolTipText(MessageManager.getText("setup.dialog.dburi.tooltip", "text", args, l)); this.jbTest.setEnabled(false); this.jbTest.setText(MessageManager.getText("setup.dialog.test.label", "text", args, l)); this.jbTest.setToolTipText(MessageManager.getText("setup.dialog.test.tooltip", "text", args, l)); this.jbTest.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent ae) { if (actionPerformedTest(ae)) { JOptionPane.showMessageDialog(FirstStartSetup.this, MessageManager.getText("setup.dialog.test.success.message", "text", new Object[0], config.getLocale()), MessageManager.getText("setup.dialog.test.success.title", "text", new Object[0], config.getLocale()), JOptionPane.INFORMATION_MESSAGE); } } }); this.jbCancel.setText(MessageManager.getText("setup.dialog.cancel.label", "text", args, l)); this.jbCancel.setToolTipText(MessageManager.getText("setup.dialog.cancel.tooltip", "text", args, l)); this.jbCancel.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent ae) { System.exit(0); } }); this.jbOk.setEnabled(false); this.jbOk.setText(MessageManager.getText("setup.dialog.ok.label", "text", args, l)); this.jbOk.setToolTipText(MessageManager.getText("setup.dialog.ok.tooltip", "text", args, l)); this.jbOk.addActionListener(new ActionListener() { public void actionPerformed(final ActionEvent ae) { if (actionPerformedTest(ae)) { String jar = jfField.getText().trim(); config.putDriver(jar, jtfClass.getText().trim()); String uri = jtfDbURI.getText().trim(); if (!uri.equals("")) { config.putDatabaseURI(jar, uri); } dispose(); } } }); FormLayout layout = new FormLayout("right:pref, 3dlu, pref, 3dlu, pref, 3dlu, pref", "p, 3dlu, p, 3dlu, p, 3dlu, p, 9dlu, p, 3dlu, p"); layout.setColumnGroups(new int[][] { { 3, 5, 7 } }); PanelBuilder builder = new PanelBuilder(layout); builder.setDefaultDialogBorder(); // Obtain a reusable constraints object to place components in the grid. CellConstraints cc = new CellConstraints(); // Fill the grid with components; the builder can create // frequently used components, e.g. separators and labels. // Add a titled separator to cell (1, 1) that spans 7 columns. builder.addSeparator(MessageManager.getText("setup.dialog.header", "text", args, l), cc.xyw(1, 1, 7)); builder.addLabel(MessageManager.getText("setup.dialog.jarfile.label", "text", args, l), cc.xy(1, 3)); builder.add(this.jfField, cc.xyw(3, 3, 5)); builder.addLabel(MessageManager.getText("setup.dialog.class.label", "text", args, l), cc.xy(1, 5)); builder.add(this.jtfClass, cc.xyw(3, 5, 5)); builder.addLabel(MessageManager.getText("setup.dialog.dburi.label", "text", args, l), cc.xy(1, 7)); builder.add(this.jtfDbURI, cc.xyw(3, 7, 5)); builder.addSeparator("", cc.xyw(1, 9, 7)); builder.add(this.jbTest, cc.xy(3, 11)); builder.add(this.jbCancel, cc.xy(5, 11)); builder.add(this.jbOk, cc.xy(7, 11)); this.getContentPane().add(builder.getPanel(), BorderLayout.CENTER); this.statusPanel.setLayout(this.statusLayout); this.statusPanel.add(this.statusLabel); this.statusPanel.add(this.statusBar); this.statusLabel.setBorder(BorderFactory.createLoweredBevelBorder()); this.statusBar.setBorder(BorderFactory.createLoweredBevelBorder()); this.statusBar.setStringPainted(true); this.getContentPane().add(this.statusPanel, BorderLayout.SOUTH); }
From source file:de.xplib.xdbm.ui.dialog.NewCollectionDialog.java
License:Open Source License
/** * /* w w w. j a v a2s. co m*/ */ private void initUI() { boolean sixdml = false; Service s = null; try { s = this.ctxColl.getService("SixdmlCollectionManagementService", "1.0"); if (s == null) { s = this.ctxColl.getService("CollectionManagementService", "1.0"); } else { sixdml = true; } if (s == null) { JOptionPane.showMessageDialog(Application.getInstance(), i18n.getText("dialog.collection.new.err.noservice"), msgErrTitle, JOptionPane.ERROR_MESSAGE); } } catch (XMLDBException e) { e.printStackTrace(Application.err); } this.setTitle(i18n.getTitle("dialog.collection.new.title." + (sixdml ? "sixdml" : "xapi"))); this.jtfParentColl.setEditable(false); this.jtfParentColl.setText(this.ctxPath); this.jtfCollName.addKeyListener(new KeyAdapter() { public void keyPressed(final KeyEvent ke) { String s = jtfCollName.getText(); if (!s.equals("")) { jtfParentColl.setText(ctxPath + "/" + s); Thread t = new Thread() { public void run() { try { if (ctxColl.getChildCollection(jtfCollName.getText()) != null) { String err = i18n.getText("dialog.collection.new.err.exit"); jtfCollName.setForeground(Color.WHITE); jtfCollName.setBackground(Color.RED); jtfCollName.setToolTipText(err); Application.err.println(err); NewCollectionExecuteAction.INSTANCE.setEnabled(false); } else { jtfCollName.setForeground(Color.BLACK); jtfCollName.setBackground(Color.WHITE); jtfCollName.setToolTipText(""); NewCollectionExecuteAction.INSTANCE.setEnabled(true); } } catch (XMLDBException e) { } } }; t.start(); } else { jtfParentColl.setText(ctxPath); NewCollectionExecuteAction.INSTANCE.setEnabled(false); } } }); NewCollectionExecuteAction.INSTANCE.setEnabled(false); NewCollectionExecuteAction.INSTANCE.setCollection(this.ctxColl); NewCollectionExecuteAction.INSTANCE.setCollectionNameComponent(this.jtfCollName); if (sixdml) { NewCollectionExecuteAction.INSTANCE.setSchemaComponent(this.jffSchema); } FormLayout layout = new FormLayout("right:pref, 3dlu, pref, 3dlu, pref", "p, 3dlu, p, 3dlu, p, 3dlu, p, 9dlu, p, 3dlu, p"); layout.setColumnGroups(new int[][] { { 3, 5 } }); PanelBuilder builder = new PanelBuilder(layout); builder.setDefaultDialogBorder(); CellConstraints cc = new CellConstraints(); builder.addLabel(i18n.getTitle("dialog.collection.new.parent"), cc.xy(1, 1)); builder.add(this.jtfParentColl, cc.xyw(3, 1, 3)); this.jtfParentColl.setToolTipText(i18n.getToolTip("dialog.collection.new.parent")); builder.addLabel(i18n.getTitle("dialog.collection.new.name"), cc.xy(1, 3)); builder.add(this.jtfCollName, cc.xyw(3, 3, 3)); this.jtfCollName.setToolTipText(i18n.getToolTip("dialog.collection.new.name")); if (sixdml) { builder.addLabel(i18n.getTitle("dialog.collection.new.schema"), cc.xy(1, 5)); builder.add(this.jffSchema, cc.xyw(3, 5, 3)); this.jffSchema.setToolTipText(i18n.getToolTip("dialog.collection.new.schema")); } builder.addSeparator("", cc.xyw(1, 7, 5)); builder.add(new JButton(new CancelDialogAction(this)), cc.xy(3, 9)); builder.add(new JButton(new CloseDialogWrapperAction(NewCollectionExecuteAction.INSTANCE, this)), cc.xy(5, 9)); this.getContentPane().setLayout(new GridLayout(1, 1)); this.getContentPane().add(builder.getPanel()); }