List of usage examples for com.jgoodies.forms.layout CellConstraints xywh
public CellConstraints xywh(int col, int row, int colSpan, int rowSpan)
Examples:
cc.xywh(1, 3, 2, 1); cc.xywh(1, 3, 7, 3);
From source file:de.erdesignerng.visual.editor.repository.MigrationScriptView.java
License:Open Source License
private void initialize() { String theColDef = "2dlu,50dlu,2dlu,fill:100dlu:grow,2dlu"; String theRowDef = "2dlu,p,2dlu,p,50dlu,p,2dlu"; FormLayout theLayout = new FormLayout(theColDef, theRowDef); setLayout(theLayout);//from w ww . j a v a 2 s. c o m CellConstraints cons = new CellConstraints(); add(new DefaultLabel(ERDesignerBundle.FROMVERSION), cons.xy(2, 2)); add(sourceVersion, cons.xy(4, 2)); add(new DefaultLabel(ERDesignerBundle.TOVERSION), cons.xy(2, 4)); add(destinationVersion, cons.xy(4, 4)); JPanel thePanel = new JPanel(); theColDef = "60dlu,fill:2dlu:grow,60dlu"; theRowDef = "p"; theLayout = new FormLayout(theColDef, theRowDef); thePanel.setLayout(theLayout); thePanel.add(okButton, cons.xy(1, 1)); okButton.setText("Ok"); thePanel.add(cancelButton, cons.xy(3, 1)); cancelButton.setText("Cancel"); add(thePanel, cons.xywh(2, 6, 3, 1)); }
From source file:de.erdesignerng.visual.editor.repository.SaveToRepositoryView.java
License:Open Source License
private void initialize() { String theColDef = "2dlu,10dlu,2dlu,50dlu,2dlu,fill:100dlu:grow,2dlu"; String theRowDef = "2dlu,p,2dlu,p,2dlu,p,2dlu,p,2dlu,p,50dlu,2dlu,p,2dlu"; FormLayout theLayout = new FormLayout(theColDef, theRowDef); setLayout(theLayout);/*from ww w . j ava 2 s . c o m*/ CellConstraints cons = new CellConstraints(); add(newEntryButton, cons.xywh(2, 2, 5, 1)); add(new DefaultLabel(ERDesignerBundle.NAME), cons.xy(4, 4)); add(newNameField, cons.xy(6, 4)); add(existingEntryButton, cons.xywh(2, 6, 5, 1)); add(new DefaultLabel(ERDesignerBundle.NAME), cons.xy(4, 8)); add(existingNameBox, cons.xy(6, 8)); add(new DefaultLabel(ERDesignerBundle.NEWNAME), cons.xy(4, 10)); add(existingNameField, cons.xy(6, 10)); JPanel thePanel = new JPanel(); theColDef = "60dlu,fill:2dlu:grow,60dlu"; theRowDef = "p"; theLayout = new FormLayout(theColDef, theRowDef); thePanel.setLayout(theLayout); thePanel.add(okButton, cons.xy(1, 1)); okButton.setText("Ok"); thePanel.add(cancelButton, cons.xy(3, 1)); cancelButton.setText("Cancel"); add(thePanel, cons.xywh(2, 13, 5, 1)); existingNameBox.addActionListener(e -> commandChangeRepositoryEntry()); }
From source file:de.erdesignerng.visual.editor.reverseengineer.ReverseEngineerView.java
License:Open Source License
/** * Initialize method.//w w w . j a v a 2s. c o m */ private void initialize() { String rowDef = "2dlu,p,2dlu,p,2dlu,p,2dlu,p,20dlu,p,2dlu"; String colDef = "2dlu,fill:60dlu:grow,fill:60dlu:grow,fill:60dlu:grow,2dlu"; FormLayout layout = new FormLayout(colDef, rowDef); setLayout(layout); CellConstraints cons = new CellConstraints(); add(new DefaultSeparator(ERDesignerBundle.SCHEMAOPTIONS), cons.xywh(2, 2, 3, 1)); add(getSchemaGrid(), cons.xywh(2, 4, 3, 1)); add(new DefaultSeparator(ERDesignerBundle.ENGINEERINGOPTIONS), cons.xywh(2, 6, 3, 1)); add(getStartButton(), cons.xywh(2, 10, 1, 1)); add(getCancelButton(), cons.xywh(4, 10, 1, 1)); add(getEngineeringOptions(), cons.xywh(2, 8, 3, 1)); }
From source file:de.erdesignerng.visual.editor.reverseengineer.ReverseEngineerView.java
License:Open Source License
/** * Getter method for component schema grid. * * @return the initialized component/* w w w. j av a 2 s. com*/ */ public JPanel getSchemaGrid() { if (schemaGrid == null) { schemaGrid = new JPanel(); String rowDef = "2dlu,80dlu,2dlu,p,2dlu"; String colDef = "40dlu:grow,2dlu,fill:70dlu"; FormLayout layout = new FormLayout(colDef, rowDef); schemaGrid.setLayout(layout); CellConstraints cons = new CellConstraints(); schemaGrid.add(getSchemaList().getScrollPane(), cons.xywh(1, 2, 3, 1)); schemaGrid.add(getRefreshButton(), cons.xywh(3, 4, 1, 1)); schemaGrid.setName("schemagrid"); } return schemaGrid; }
From source file:de.erdesignerng.visual.editor.reverseengineer.ReverseEngineerView.java
License:Open Source License
/** * Getter method for component engineeringoptions. * * @return the initialized component// ww w .jav a 2 s . c o m */ public JPanel getEngineeringOptions() { if (engineeringOptions == null) { engineeringOptions = new JPanel(); String rowDef = "2dlu,p,2dlu,p,2dlu,p,2dlu"; String colDef = "80dlu,2dlu,40dlu:grow"; FormLayout layout = new FormLayout(colDef, rowDef); engineeringOptions.setLayout(layout); CellConstraints cons = new CellConstraints(); engineeringOptions.add(getComponent9(), cons.xywh(1, 2, 1, 1)); engineeringOptions.add(getNaming(), cons.xywh(3, 2, 1, 1)); engineeringOptions.setName("engineeringoptions"); } return engineeringOptions; }
From source file:de.erdesignerng.visual.editor.reverseengineer.TablesSelectEditorView.java
License:Open Source License
/** * Initialize method./*from ww w.jav a 2 s .c o m*/ */ private void initialize() { String rowDef = "8dlu,fill:250dlu,8dlu,p,2dlu"; String colDef = "2dlu,fill:60dlu,2dlu:grow,fill:60dlu,2dlu"; FormLayout layout = new FormLayout(colDef, rowDef); setLayout(layout); CellConstraints cons = new CellConstraints(); add(getContentPanel(), cons.xywh(2, 2, 3, 1)); add(getOkButton(), cons.xywh(2, 4, 1, 1)); add(getCancelButton(), cons.xywh(4, 4, 1, 1)); buildGroups(); }
From source file:de.erdesignerng.visual.editor.reverseengineer.TablesSelectEditorView.java
License:Open Source License
/** * Getter method for component ContentPanel. * * @return the initialized component//from www . j av a2 s. c o m */ public JPanel getContentPanel() { if (contentPanel == null) { contentPanel = new JPanel(); String rowDef = "2dlu,fill:200dlu:grow,2dlu,p,2dlu"; String colDef = "fill:180dlu:grow"; FormLayout layout = new FormLayout(colDef, rowDef); contentPanel.setLayout(layout); CellConstraints cons = new CellConstraints(); contentPanel.add(getTableList().getScrollPane(), cons.xywh(1, 2, 1, 1)); DefaultPanel thePanel = new DefaultPanel(); thePanel.setLayout(new FormLayout("fill:60dlu:grow,2dlu,fill:60dlu:grow", "p,2dlu,p")); thePanel.add(selectAll, cons.xy(1, 1)); thePanel.add(deselectAll, cons.xy(3, 1)); thePanel.add(invertSelection, cons.xy(1, 3)); contentPanel.add(thePanel, cons.xywh(1, 4, 1, 1)); } return contentPanel; }
From source file:de.erdesignerng.visual.editor.table.TableEditorView.java
License:Open Source License
private void initialize() { String rowDef = "2dlu,p,2dlu,p,fill:260dlu,p,20dlu,p,2dlu"; String colDef = "2dlu,left:45dlu,2dlu,fill:140dlu:grow,fill:60dlu,2dlu,fill:60dlu,2dlu"; FormLayout layout = new FormLayout(colDef, rowDef); setLayout(layout);/* ww w .j av a 2 s. co m*/ attributesTable.setCellSelectionEnabled(true); CellConstraints cons = new CellConstraints(); add(getComponent1(), cons.xywh(2, 2, 1, 1)); add(getEntityName(), cons.xywh(4, 2, 4, 1)); add(getMainTabbedPane(), cons.xywh(2, 4, 6, 2)); add(getOkButton(), cons.xywh(5, 8, 1, 1)); add(getCancelButton(), cons.xywh(7, 8, 1, 1)); buildGroups(); getAddIndexAttribute().setSelected(true); getRemoveFromIndexButton().setEnabled(false); }
From source file:de.erdesignerng.visual.editor.table.TableEditorView.java
License:Open Source License
public DefaultTabbedPaneTab getAttributesTab() { if (attributesTab == null) { attributesTab = new DefaultTabbedPaneTab(mainTabbedPane, ERDesignerBundle.ATTRIBUTES); FormLayout theLayout = new FormLayout("fill:10dlu:grow,2dlu,60dlu,2dlu,60dlu", "fill:10dlu:grow,2dlu,p"); attributesTab.setLayout(theLayout); CellConstraints cons = new CellConstraints(); attributesTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE); attributesTable.setModel(attributeTableModel); attributesTable.getColumnModel().getColumn(0).setPreferredWidth(200); attributesTable.getColumnModel().getColumn(1).setPreferredWidth(100); attributesTable.getColumnModel().getColumn(2).setPreferredWidth(60); attributesTable.getColumnModel().getColumn(3).setPreferredWidth(60); attributesTable.getColumnModel().getColumn(4).setPreferredWidth(60); attributesTable.getColumnModel().getColumn(5).setPreferredWidth(50); attributesTable.getColumnModel().getColumn(6).setPreferredWidth(100); attributesTable.getColumnModel().getColumn(7).setPreferredWidth(100); attributesTable.getColumnModel().getColumn(8).setPreferredWidth(300); attributesTable.getTableHeader().setResizingAllowed(true); attributesTable.getTableHeader().setReorderingAllowed(false); attributesTable.setAutoResizeMode(DefaultTable.AUTO_RESIZE_OFF); attributesTable.setRowHeight(22); DefaultComboBox theBox = new DefaultComboBox(); theBox.setBorder(BorderFactory.createEmptyBorder()); theBox.setModel(dataTypeModel);//from w w w . ja va 2 s. co m attributesTable.setDefaultEditor(DataType.class, new DefaultCellEditor(theBox)); attributesTable.setDefaultRenderer(DataType.class, ModelItemDefaultCellRenderer.getInstance()); attributesTable.setDefaultRenderer(String.class, ModelItemDefaultCellRenderer.getInstance()); attributesTable.setDefaultRenderer(Integer.class, ModelItemDefaultCellRenderer.getInstance()); attributesTable.setDefaultRenderer(Boolean.class, CheckboxCellRenderer.getInstance()); attributesTab.add(attributesTable.getScrollPane(), cons.xywh(1, 1, 5, 1)); attributesTab.add(getNewButton(), cons.xy(3, 3)); attributesTab.add(getDeleteButton(), cons.xy(5, 3)); } return attributesTab; }
From source file:de.erdesignerng.visual.editor.table.TableEditorView.java
License:Open Source License
public DefaultTabbedPaneTab getIndexesTab() { if (indexesTab == null) { indexesTab = new DefaultTabbedPaneTab(mainTabbedPane, ERDesignerBundle.INDEXES); String rowDef = "2dlu,p,185dlu:grow,p,2dlu,p,2dlu"; String colDef = "2dlu,50dlu:grow,2dlu,50dlu:grow,2dlu,50dlu:grow,11dlu:grow,2dlu,11dlu:grow,2dlu,80dlu:grow,2dlu,70dlu:grow,2dlu"; FormLayout layout = new FormLayout(colDef, rowDef); indexesTab.setLayout(layout);/*www . j ava 2 s . c o m*/ CellConstraints cons = new CellConstraints(); indexesTab.add(getIndexList().getScrollPane(), cons.xywh(2, 2, 8, 3)); indexesTab.add(getNewIndexButton(), cons.xywh(2, 6, 1, 1)); indexesTab.add(getDeleteIndexButton(), cons.xywh(6, 6, 4, 1)); indexesTab.add(getIndexTabbedPane(), cons.xywh(11, 2, 3, 3)); indexesTab.add(getUpdateIndexButton(), cons.xywh(13, 6, 1, 1)); indexesTab.setName("IndexesTab"); indexesTab.setVisible(false); } return indexesTab; }