List of usage examples for com.jgoodies.forms.factories Borders createEmptyBorder
public static Border createEmptyBorder(ConstantSize top, ConstantSize left, ConstantSize bottom, ConstantSize right)
From source file:captureplugin.CapturePluginSettingsTab.java
License:Open Source License
/** * Returns the PluginPanel//from w w w . j av a2 s . co m * @return Panel */ public JPanel createSettingsPanel() { mPanel = new CapturePluginPanel(mOwner, mCloneData); mPanel.setBorder(Borders.createEmptyBorder(Sizes.DLUY5, Sizes.DLUX5, Sizes.DLUY5, Sizes.DLUX5)); mPanel.setSelectedTab(mCurrentPanel); return mPanel; }
From source file:com.salas.bb.reports.ReportsDialog.java
License:Open Source License
private JComponent buildButtonBar() { JButton btnReset = new JButton(new ResetAction()); JPanel bar = ButtonBarFactory.buildHelpBar(btnReset, createCloseButton(true)); bar.setBorder(Borders.createEmptyBorder(LayoutStyle.getCurrent().getDialogMarginY(), Sizes.dluX(0), Sizes.dluY(0), Sizes.dluX(0))); return bar;/* w w w. j a v a2 s. c om*/ }
From source file:de.dfki.dmas.owls2wsdl.gui.ConfigurationFrame.java
License:Open Source License
/** Creates a new instance of ConfigurationFrame */ public ConfigurationFrame(OWLS2WSDLGui frame) { this.mainWindowRef = frame; this.setTitle("OWLS2WSDL :: Configuration"); this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); this.setPreferredSize(ConfigurationFrame.PREFERRED_SIZE); this.contentPane = new JPanel(new BorderLayout()); // this.contentPane.setBackground(Color.WHITE); this.setContentPane(this.contentPane); this.contentPane.setBorder( Borders.createEmptyBorder(Sizes.pixel(10), Sizes.pixel(10), Sizes.pixel(10), Sizes.pixel(10))); int fieldLen = 28; this.applPathField = new JTextField(32); this.applPathField.setEditable(false); this.applPathField.setBackground(Color.WHITE); this.applPathBrowseButton = new JButton("Path..."); this.applPathBrowseButton.setActionCommand(SET_APPL_PATH); this.applPathBrowseButton.addActionListener(this); this.logPathField = new JTextField(fieldLen); this.logPathField.setEditable(false); this.persistentProjectDirectoryField = new JTextField(fieldLen); this.persistentDatatypeDirectoryField = new JTextField(fieldLen); this.persistentProjectDirectoryField.setEditable(false); this.persistentDatatypeDirectoryField.setEditable(false); this.persistentDatatypeCheckBox = new JCheckBox("load referenced datatypes only (experimental)"); this.jconsoleCheckBox = new JCheckBox("activate JConsole at start time"); // this.xsdExportPathField = new JTextField(fieldLen); this.exportDirectoryField = new JTextField(32); this.exportDirectoryField.setEditable(false); this.exportDirectoryField.setBackground(Color.WHITE); this.exportDirectoryBrowseButton = new JButton("Path..."); this.exportDirectoryBrowseButton.setActionCommand(SET_EXPORT_DIRECTORY); this.exportDirectoryBrowseButton.addActionListener(this); this.buildRelativePathCheckBox = new JCheckBox("extract in relative paths"); this.buildRelativePathCheckBox.setSelected(false); this.buildRelativePathCheckBox.setEnabled(false); // this.applPathField.setFont(new Font("Dialog", Font.PLAIN, 10)); // System.out.println("FONT_INFO: "+this.applPathField.getFont().toString()); xsdTypeInheritanceBehaviour = new JComboBox<String>(); xsdTypeInheritanceBehaviour.addItem(AbstractDatatype.InheritanceByNone); xsdTypeInheritanceBehaviour.addItem(AbstractDatatype.InheritanceBySuperClassOnly); xsdTypeInheritanceBehaviour.addItem(AbstractDatatype.InheritanceByRDFTypeOnly); xsdTypeInheritanceBehaviour.addItem(AbstractDatatype.InheritanceByRDFTypeFirstParentsSecond); xsdTypeInheritanceBehaviour.addItem(AbstractDatatype.InheritanceByParentsFirstRDFTypeSecond); String[] primitiveSchemaTypes = { "http://www.w3.org/2001/XMLSchema#anyType", "http://www.w3.org/2001/XMLSchema#anyURI", "http://www.w3.org/2001/XMLSchema#string", "http://www.w3.org/2001/XMLSchema#decimal", "http://www.w3.org/2001/XMLSchema#integer", "http://www.w3.org/2001/XMLSchema#float", "http://www.w3.org/2001/XMLSchema#boolean", "http://www.w3.org/2001/XMLSchema#date", "http://www.w3.org/2001/XMLSchema#time" }; projectDefaultXsdTypeField = new JComboBox<String>(primitiveSchemaTypes); shortButton = new JRadioButton("use ext. venetian blind (short)"); shortButton.setBorderPainted(false); shortButton.setContentAreaFilled(false); shortButton.setSelected(true);// www .jav a 2s. c om hierarchyButton = new JRadioButton("use hierarchy pattern (subclassing)"); hierarchyButton.setBorderPainted(false); hierarchyButton.setContentAreaFilled(false); hierarchyButton.setSelected(false); xsdSelectionGroup = new ButtonGroup(); xsdSelectionGroup.add(shortButton); xsdSelectionGroup.add(hierarchyButton); addMetaTypesCheckBox = new JCheckBox("add meta types to express OWL anonymous language terms"); addAnnotationCheckBox = new JCheckBox("add XML Schema annotations (general and OWL information)"); defaultElementDepthField = new JTextField(2); defaultElementDepthField.setText("0"); projectElementDepthField = new JComboBox<String>(); for (int i = 0; i <= 10; i++) { projectElementDepthField.addItem(Integer.toString(i)); } deLangButton = new JRadioButton("de"); enLangButton = new JRadioButton("en"); lanSelectionGroup = new ButtonGroup(); lanSelectionGroup.add(deLangButton); lanSelectionGroup.add(enLangButton); plasticLfButton = new JRadioButton("PlasticXP"); plasticLfButton.setActionCommand("CHANGE_LF_TO_PLASTIC"); plasticLfButton.addActionListener(this); plasticLfButton.setSelected(true); windowsLfButton = new JRadioButton("Windows"); windowsLfButton.setActionCommand("CHANGE_LF_TO_WINDOWS"); windowsLfButton.addActionListener(this); motifLfButton = new JRadioButton("Motif"); motifLfButton.setActionCommand("CHANGE_LF_TO_MOTIF"); motifLfButton.addActionListener(this); lfSelectionGroup = new ButtonGroup(); lfSelectionGroup.add(plasticLfButton); lfSelectionGroup.add(windowsLfButton); lfSelectionGroup.add(motifLfButton); // EXPORT / WSDL /OWL-S Config-Panel this.wsdlNamespaceField = new JTextField(fieldLen); this.autoNamespaceBaseSelectButton = new JRadioButton("auto (using parsed service data)"); this.autoNamespaceBaseSelectButton.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED) { System.out.println("autoNamespaceBaseSelectButton selected"); wsdlNamespaceField.setEditable(false); wsdlNamespaceField.setEnabled(false); } } }); this.newNamespaceBaseSelectButton = new JRadioButton("set new tns: <base_path><service>"); this.newNamespaceBaseSelectButton.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED) { System.out.println("newNamespaceBaseSelectButton selected"); wsdlNamespaceField.setEditable(true); wsdlNamespaceField.setEnabled(true); } } }); nsBaseSelectionGroup = new ButtonGroup(); nsBaseSelectionGroup.add(autoNamespaceBaseSelectButton); nsBaseSelectionGroup.add(newNamespaceBaseSelectButton); // --- // this.axisServicePathField = new JTextField(fieldLen); // --- this.owlsBaseField = new JTextField(fieldLen); this.autoOWLSBaseSelectButton = new JRadioButton("auto (using parsed service data)"); this.autoOWLSBaseSelectButton.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED) { owlsBaseField.setEditable(false); owlsBaseField.setEnabled(false); } } }); this.newOWLSBaseSelectButton = new JRadioButton("set new owl-s base: <base_path><OWLS_DOC>"); this.newOWLSBaseSelectButton.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED) { owlsBaseField.setEditable(true); owlsBaseField.setEnabled(true); } } }); owlsBaseSelectionGroup = new ButtonGroup(); owlsBaseSelectionGroup.add(autoOWLSBaseSelectButton); owlsBaseSelectionGroup.add(newOWLSBaseSelectButton); // --- this.wsdldocPathField = new JTextField(fieldLen); this.autoWsdldocPathSelectButton = new JRadioButton("auto (use WSDL Builder setting above)"); this.autoWsdldocPathSelectButton.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED) { wsdldocPathField.setEditable(false); wsdldocPathField.setEnabled(false); } } }); this.setWsdlDocPathSelectButton = new JRadioButton("set new address path: <base_path><WSDL_DOC>"); this.setWsdlDocPathSelectButton.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED) { wsdldocPathField.setEditable(true); wsdldocPathField.setEnabled(true); } } }); this.wsdldocPathSelectionGroup = new ButtonGroup(); this.wsdldocPathSelectionGroup.add(autoWsdldocPathSelectButton); this.wsdldocPathSelectionGroup.add(setWsdlDocPathSelectButton); // ====================================================================== JComponent configPanel = buildConfigSubPanel(false); JPanel commandPanel = buildCommandSubPanel(); this.add(configPanel, BorderLayout.CENTER); this.add(commandPanel, BorderLayout.SOUTH); this.pack(); this.locateOnScreen(this); this.initContentsFromConfigurationFile(); // updateFromProjectData... this.projectElementDepthField.setEnabled(false); this.xsdTypeInheritanceBehaviour.setEnabled(false); }
From source file:de.dfki.dmas.owls2wsdl.gui.ExportWSDLFrame.java
License:Open Source License
/** Creates a new instance of ExportWSDLFrame */ public ExportWSDLFrame() { System.out.println("[C] ExportWSDLFrame"); urlField = new JTextField(10); urlField.setEditable(false);/* ww w . j av a 2s. c om*/ if (OWLS2WSDLSettings.getInstance().containsKey("EXPORT_PATH")) { this.exportDirectory = new File(OWLS2WSDLSettings.getInstance().getProperty("EXPORT_PATH")); this.urlField.setText(this.exportDirectory.getAbsolutePath()); // getCanonicalPath()); } this.setTitle("OWLS2WSDL :: Export WSDL and OWL-S"); this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); this.setPreferredSize(PREFERRED_SIZE); this.contentPane = new JPanel(new BorderLayout()); this.setContentPane(this.contentPane); this.contentPane.setBorder( Borders.createEmptyBorder(Sizes.pixel(10), Sizes.pixel(10), Sizes.pixel(10), Sizes.pixel(10))); translatableServiceList = new JList<AbstractService>(new ServiceListModel()); translatableServiceList.setVisibleRowCount(7); translatableServiceList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); nonTranslatableServiceList = new JList<AbstractService>(new ServiceListModel()); nonTranslatableServiceList.setVisibleRowCount(7); nonTranslatableServiceList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); // buildRelativePathCheckBox = new JCheckBox("use relative paths"); generateWSDLCheckBox = new JCheckBox("WSDL"); generateWSDLCheckBox.setActionCommand(CHECK_STARTBUTTON); generateWSDLCheckBox.addActionListener(this); generateOWLSCheckBox = new JCheckBox("reconstruct OWL-S from internal metamodel"); generateOWLSCheckBox.setActionCommand(CHECK_STARTBUTTON); generateOWLSCheckBox.addActionListener(this); translatableCount = "0"; nontranslatableCount = "0"; exportLog = new JTextArea("", 6, 20); exportPanel = buildExportSubPanel(false); JPanel commandPanel = buildCommandSubPanel(); this.add(exportPanel, BorderLayout.CENTER); this.add(commandPanel, BorderLayout.SOUTH); this.pack(); this.locateOnScreen(this); this.exportThread = new WSDLOWLSExport(this); }
From source file:dvbplugin.DVBPluginSettingsTab.java
License:Open Source License
/** * Creates the settings panel for this tab. *///w w w.j a v a 2s . co m public JPanel createSettingsPanel() { set = new SettingsPanel(); set.setBorder(Borders.createEmptyBorder(Sizes.DLUY5, Sizes.DLUX5, Sizes.DLUY5, Sizes.DLUX5)); return set; }
From source file:org.openthinclient.console.nodes.views.IncomingAssociationsView.java
License:Open Source License
public IncomingAssociationsView(Group<DirectoryObject> group) { setLayout(new BorderLayout()); final JXTreeTable tt = new JXTreeTable(new MyNBNodeTreeTableModel(new GroupNode(group))); tt.setShowHorizontalLines(false);/*w w w . ja va2 s . co m*/ tt.setShowVerticalLines(false); tt.setTreeCellRenderer(new NBNodeTreeCellRenderer()); tt.setHighlighters(new HighlighterPipeline(new Highlighter[] { AlternateRowHighlighter.genericGrey })); expandOneLevel(tt); add(tt.getTableHeader(), BorderLayout.NORTH); add(tt, BorderLayout.CENTER); setBorder(Borders.createEmptyBorder(LayoutStyle.getCurrent().getRelatedComponentsPadY(), Sizes.ZERO, LayoutStyle.getCurrent().getRelatedComponentsPadY(), Sizes.ZERO)); setOpaque(false); if (group instanceof DirectoryObject) { final DirectoryObject dirObject = (DirectoryObject) group; setName(Messages.getString("IncomingAssociationsView.assigned", dirObject.getName())); //$NON-NLS-1$ // setName(Messages.getString("IncomingAssociationsView.assigned_object") // + " " + dirObject.getName() +" " // + Messages.getString("IncomingAssociationsView.assigned_use") // ); //$NON-NLS-1$ } }
From source file:org.openthinclient.console.nodes.views.OutgoingAssociationsView.java
License:Open Source License
public OutgoingAssociationsView(AssociatedObjectsProvider aop) { setLayout(new BorderLayout()); JXTreeTable tt = new JXTreeTable(new MyNBNodeTreeTableModel(new AssociatedObjectsProviderNode(aop))); tt.setShowHorizontalLines(false);/*from w w w .ja v a 2s .co m*/ tt.setShowVerticalLines(false); tt.setTreeCellRenderer(new NBNodeTreeCellRenderer()); tt.setHighlighters(new HighlighterPipeline(new Highlighter[] { AlternateRowHighlighter.genericGrey })); expandOneLevel(tt); add(tt.getTableHeader(), BorderLayout.NORTH); add(tt, BorderLayout.CENTER); setBorder(Borders.createEmptyBorder(LayoutStyle.getCurrent().getRelatedComponentsPadY(), Sizes.ZERO, LayoutStyle.getCurrent().getRelatedComponentsPadY(), Sizes.ZERO)); setOpaque(false); setName(Messages.getString("OutgoingAssociationsView.assigned")); //$NON-NLS-1$ }
From source file:org.openthinclient.console.nodes.views.ProfileView.java
License:Open Source License
public ProfileView(Profile profile, Realm realm) { setLayout(new BorderLayout()); setOpaque(false);/*from w w w . j ava 2s.com*/ try { final Schema schema = profile.getSchema(realm); Node invisibleNote = null; if (profile.getClass() == Realm.class) { invisibleNote = schema.getChild("invisibleObjects"); schema.removeChild(invisibleNote); } if (schema != null) { final JXTreeTable tt = new JXTreeTable(new ProfileTreeTableModel(schema, profile)); tt.setShowHorizontalLines(false); tt.setShowVerticalLines(false); tt.expandAll(); tt.setTreeCellRenderer(new MyTreeCellRenderer()); tt.setHighlighters( new HighlighterPipeline(new Highlighter[] { AlternateRowHighlighter.genericGrey })); add(tt.getTableHeader(), BorderLayout.NORTH); add(tt, BorderLayout.CENTER); setBorder(Borders.createEmptyBorder(LayoutStyle.getCurrent().getRelatedComponentsPadY(), Sizes.ZERO, LayoutStyle.getCurrent().getRelatedComponentsPadY(), Sizes.ZERO)); if (invisibleNote != null) schema.addChild(invisibleNote); } } catch (final SchemaLoadingException e) { // FIXME e.printStackTrace(); add(new ErrorPanel(Messages.getString("ProfileViewFactory.errors.couldNotLoadSchema"), null, null, e)); // // final JLabel errorMessage = new JLabel(); // errorMessage.setOpaque(false); // // errorMessage.setText("<html><font color=#ff0000><b>" // + Messages.getString("ProfileViewFactory.errors.couldNotLoadSchema") // + "</b><p>" + e.toString() + "</font>"); // // add(errorMessage); // FIXME: add textual representation of settings. } setName(Messages.getString("ProfileViewFactory.title")); //$NON-NLS-1$ }
From source file:org.springframework.richclient.util.GuiStandardUtils.java
License:Apache License
public static Border createEvenlySpacedBorder(ConstantSize space) { return Borders.createEmptyBorder(space, space, space, space); }
From source file:org.springframework.richclient.util.GuiStandardUtils.java
License:Apache License
public static Border createLeftAndRightBorder(ConstantSize space) { return Borders.createEmptyBorder(Sizes.ZERO, space, Sizes.ZERO, space); }