info.clearthought.layout.TableLayout Java Examples
The following examples show how to use
info.clearthought.layout.TableLayout.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BaseDialog.java From nextreports-designer with Apache License 2.0 | 6 votes |
private void initUI() { JPanel mainPanel = new JPanel(); // create the layout double[] columns = { TableLayoutConstants.FILL, }; double[] rows = { TableLayoutConstants.FILL, TableLayoutConstants.PREFERRED }; TableLayout layout = new TableLayout(columns, rows); layout.setVGap(10); mainPanel.setLayout(layout); createButtonsPanel(); mainPanel.add(basePanel, "0, 0"); mainPanel.add(buttonsPanel, "0, 1"); mainPanel.setBorder(new CompoundBorder(new EmptyBorder(0, 0, 0, 0), new EmptyBorder(10, 10, 10, 10))); getContentPane().add(mainPanel); pack(); }
Example #2
Source File: WindowEmbedDemo.java From java-example with MIT License | 6 votes |
private JPanel layoutActionButtonPanel() { JPanel buttonPanel = new JPanel(); JPanel topPanel = new JPanel(); double size[][] = {{10, 190, 20, 190, 10}, {25, 10, 25, 10}}; topPanel.setLayout(new TableLayout(size)); topPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createBevelBorder(2), "Desktop")); launch = new JButton("Launch OpenFin"); launch.setActionCommand("start"); close = new JButton("Shutdown OpenFin"); close.setActionCommand("close"); topPanel.add(launch, "1,0,1,0"); topPanel.add(close, "3,0,3,0"); close.addActionListener(this); launch.addActionListener(this); buttonPanel.add(topPanel, "0,0"); return buttonPanel; }
Example #3
Source File: OpenFinDesktopDemo.java From java-example with MIT License | 6 votes |
private JPanel layoutAppDescriptionPanel() { JPanel panel = new JPanel(); double size[][] = {{TableLayout.FILL, 100}, {20, 20, 20, 20, 20, 20, 20}}; panel.setLayout(new TableLayout(size)); panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createBevelBorder(2), "Application Settings")); panel.add(uuidLabel = new JLabel(), "0, 0, 0, 0"); panel.add(nameLabel = new JLabel(), "0, 1, 0, 1"); panel.add(versionLabel = new JLabel(), "0, 2, 0, 2"); panel.add(urlLabel = new JLabel(), "0, 3, 0, 3"); panel.add(resizeLabel = new JLabel(), "1, 1, 1, 1"); panel.add(frameLabel = new JLabel(), "1, 2, 1, 2"); panel.add(autoShowLabel = new JLabel(), "1, 3, 1, 3"); return panel; }
Example #4
Source File: LoadAppsDialog.java From java-example with MIT License | 6 votes |
private JPanel layoutDescriptionPanel() { usernameLabel = new JLabel("Username: "); usernameLabel.setHorizontalAlignment(SwingConstants.RIGHT); username = new JTextField(); username.setColumns(50); passwordLabel = new JLabel("password: "); passwordLabel.setHorizontalAlignment(SwingConstants.RIGHT); password = new JPasswordField(); password.setColumns(50); double size[][] = {{0.25, 0.75}, {30,30}}; TableLayout twoColLayout = new TableLayout(size); JPanel twoColPanel = new JPanel(twoColLayout); twoColPanel.add(usernameLabel, "0, 0"); twoColPanel.add(username, "1, 0"); twoColPanel.add(passwordLabel , "0, 1"); twoColPanel.add(password , "1, 1"); return twoColPanel; }
Example #5
Source File: ChartSourceSelectPanel.java From ramus with GNU General Public License v3.0 | 6 votes |
private Component createSourceTypePanel() { double[][] size = { {5, TableLayout.MINIMUM, TableLayout.FILL, TableLayout.MINIMUM, TableLayout.FILL, 5}, {5, TableLayout.FILL, 5}}; TableLayout layout = new TableLayout(size); layout.setHGap(5); layout.setVGap(5); JPanel panel = new JPanel(layout); panel.add(new JLabel(ChartResourceManager.getString("SourceType")), "1,1"); panel.add(sourceType, "2,1"); panel.add(new JLabel(ChartResourceManager .getString("SourceType.tableAttribute")), "3,1"); panel.add(tableAttribute, "4,1"); return panel; }
Example #6
Source File: StatusPanel.java From ramus with GNU General Public License v3.0 | 6 votes |
/** * This method initializes this * * @return void */ private void initialize() { double[][] size = {{5, TableLayout.FILL, 5}, {5, TableLayout.FILL, 5}}; this.setLayout(new TableLayout(size)); final GridLayout gridLayout3 = new GridLayout(); JPanel child = new JPanel(gridLayout3); this.setSize(351, 105); gridLayout3.setRows(3); gridLayout3.setColumns(2); gridLayout3.setHgap(5); gridLayout3.setVgap(5); child.add(getJRadioButton(), null); child.add(getJRadioButton1(), null); child.add(getJRadioButton2(), null); child.add(getJRadioButton3(), null); child.add(getJRadioButton4(), null); child.add(getJTextField(), null); this.add(child, "1,1"); }
Example #7
Source File: DBBrowserPropertiesPanel.java From nextreports-designer with Apache License 2.0 | 6 votes |
private void initUI() { // create the layout double[] columns = { TableLayoutConstants.PREFERRED, TableLayoutConstants.FILL, }; double[] rows = { TableLayoutConstants.PREFERRED, TableLayoutConstants.PREFERRED }; TableLayout layout = new TableLayout(columns, rows); layout.setHGap(6); layout.setVGap(6); this.setLayout(layout); this.add(new JCheckBox("Show all schemas into object tree"), "0, 0, 1, 0"); this.add(new JLabel("Object Filter"), "0, 1"); this.add(new JTextField(25), "1, 1"); }
Example #8
Source File: JoinPropertiesPanel.java From nextreports-designer with Apache License 2.0 | 6 votes |
private JPanel createJoinPanel() { JPanel joinPanel = new JPanel(); // create the layout double[] columns = { TableLayoutConstants.PREFERRED, TableLayoutConstants.PREFERRED, TableLayoutConstants.PREFERRED }; double[] rows = { TableLayoutConstants.PREFERRED }; TableLayout layout = new TableLayout(columns, rows); layout.setVGap(6); layout.setHGap(6); joinPanel.setLayout(layout); joinPanel.add(leftTextField, "0, 0"); joinPanel.add(operatorsComboBox, "1, 0"); joinPanel.add(rightTextField, "2, 0"); return joinPanel; }
Example #9
Source File: NewJavaScriptDialog.java From ramus with GNU General Public License v3.0 | 6 votes |
public NewJavaScriptDialog(GUIFramework framework) { super(framework.getMainFrame(), true); this.engine = framework.getEngine(); setTitle(ScriptPlugin.getBundle() .getString("NewJavaScriptDialog.title")); double[][] size = {{5, TableLayout.FILL, TableLayout.MINIMUM, 5}, {5, TableLayout.MINIMUM, 5}}; JPanel panel = new JPanel(new TableLayout(size)); panel.add(moduleName, "1, 1"); panel.add(new JLabel(".js"), "2, 1"); setMainPane(panel); this.pack(); this.setMinimumSize(getSize()); centerDialog(); Options.loadOptions(this); }
Example #10
Source File: AttributeOrderEditPanel.java From ramus with GNU General Public License v3.0 | 6 votes |
private JComponent createUpDown() { TableLayout layout = new TableLayout(new double[]{TableLayout.FILL}, new double[]{TableLayout.FILL, 5, TableLayout.FILL}); JPanel panel = new JPanel(layout); JButton upButton = new JButton(up); upButton.setFocusable(false); JButton downButton = new JButton(down); downButton.setFocusable(false); panel.add(upButton, "0,0"); panel.add(downButton, "0,2"); JPanel p = new JPanel(new FlowLayout()); p.add(panel); return p; }
Example #11
Source File: AttributeHierarchyEditorPanel.java From ramus with GNU General Public License v3.0 | 6 votes |
/** * This method initializes this * * @return void */ private void initialize() { double[][] size = { {5, TableLayout.FILL, 5, TableLayout.MINIMUM, 5, TableLayout.FILL, 5, TableLayout.MINIMUM, 5}, {5, TableLayout.MINIMUM, 5, TableLayout.FILL, 5}}; setLayout(new TableLayout(size)); jLabel1 = new JLabel(); jLabel1.setText(GlobalResourcesManager .getString("HierarchicalAttributes")); jLabel = new JLabel(); jLabel.setText(GlobalResourcesManager.getString("PresentAttributes")); this.add(jLabel, "1,1"); this.add(jLabel1, "5, 1"); this.add(getJScrollPane1(), "1,3"); this.add(getJPanel1(), "3,3"); this.add(getJScrollPane(), "5,3"); this.add(getJPanel(), "7,3"); }
Example #12
Source File: SQLViewPanel.java From nextreports-designer with Apache License 2.0 | 6 votes |
private void initUI() { double[] columns = { TableLayoutConstants.FILL, TableLayoutConstants.PREFERRED, TableLayoutConstants.PREFERRED, TableLayoutConstants.PREFERRED }; double[] rows = { TableLayoutConstants.PREFERRED, }; TableLayout layout = new TableLayout(columns, rows); layout.setHGap(6); this.setLayout(layout); createMaxRowsPanel(); add(createMaxRowsPanel(), "0, 0"); add(timeLabel = new JLabel("0 " + I18NSupport.getString("seconds")), "1, 0"); add(new JLine(), "2, 0"); add(rowsLabel = new JLabel("0 " + I18NSupport.getString("rows")), "3, 0"); }
Example #13
Source File: EditUserDialog.java From ramus with GNU General Public License v3.0 | 5 votes |
public EditUserDialog(JDialog dialog, User user, AdminPanelPlugin plugin) { super(dialog, true); this.user = user; this.setDefaultCloseOperation(DISPOSE_ON_CLOSE); if (user == null) { setTitle(plugin.getString("UserDialog.Create")); this.user = new User(); } else { setTitle(plugin.getString("UserDialog.Edit")); login.setText(user.getLogin()); name.setText(user.getName()); password.setText(user.getPassword()); login.setEnabled(false); } double[][] size = { {5, TableLayout.FILL, 5, TableLayout.FILL, 5}, {5, TableLayout.FILL, 5, TableLayout.FILL, 5, TableLayout.FILL, 5}}; TableLayout layout = new TableLayout(size); JPanel contentPane = new JPanel(layout); contentPane.add(new JLabel(plugin.getString("UserDialog.Login")), "1, 1"); contentPane.add(login, "3, 1"); contentPane .add(new JLabel(plugin.getString("UserDialog.Name")), "1, 3"); contentPane.add(name, "3, 3"); contentPane.add(new JLabel(plugin.getString("UserDialog.Password")), "1, 5"); contentPane.add(password, "3, 5"); this.setMainPane(contentPane); this.pack(); this.setMinimumSize(getSize()); this.setLocationRelativeTo(null); Options.loadOptions(this); }
Example #14
Source File: WindowEmbedDemo.java From java-example with MIT License | 5 votes |
private JPanel layoutCenterPanel() { JPanel panel = new JPanel(); double size[][] = {{TableLayout.FILL}, {120, TableLayout.FILL}}; panel.setLayout(new TableLayout(size)); panel.add(layoutActionButtonPanel(), "0,0,0,0"); panel.add(layoutEmbedPanel(), "0, 1, 0, 1"); return panel; }
Example #15
Source File: DockingDemo2.java From java-example with MIT License | 5 votes |
private JPanel layoutCenterPanel() { JPanel panel = new JPanel(); double size[][] = {{TableLayout.FILL}, {150, 150, TableLayout.FILL}}; panel.setLayout(new TableLayout(size)); return panel; }
Example #16
Source File: DockingDemo2.java From java-example with MIT License | 5 votes |
private JPanel layoutActionButtonPanel() { JPanel buttonPanel = new JPanel(); JPanel topPanel = new JPanel(); double size[][] = {{10, 190, 20, 190, 10}, {25, 10, 25, 10}}; topPanel.setLayout(new TableLayout(size)); topPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createBevelBorder(2), "Desktop")); undockButton = new JButton("Undock"); undockButton.setActionCommand("undock-window"); undockButton.setEnabled(false); topPanel.add(undockButton, "1,0,1,0"); undockButton.addActionListener(this); buttonPanel.add(topPanel, "0,0"); return buttonPanel; }
Example #17
Source File: DockingDemo2.java From java-example with MIT License | 5 votes |
private JPanel layoutLeftPanel() { JPanel panel = new JPanel(); double size[][] = {{410}, {120, 30, TableLayout.FILL}}; panel.setLayout(new TableLayout(size)); panel.add(layoutActionButtonPanel(), "0,0,0,0"); panel.add(layoutDockStatus(), "0,1,0,1"); return panel; }
Example #18
Source File: OpenFinDesktopDemo.java From java-example with MIT License | 5 votes |
private JPanel layoutLeftPanel() { JPanel panel = new JPanel(); double size[][] = {{TableLayout.FILL}, {160, 30, TableLayout.FILL}}; panel.setLayout(new TableLayout(size)); panel.add(layoutActionButtonPanel(), "0,0,0,0"); JLabel label = new JLabel(" Active Applications"); panel.add(label, "0,1,0,1"); this.appOptionsList = new ArrayList<ApplicationOptions>(); this.applicationList = new HashMap<String, Application>(); this.activeApplications = new JList(new DefaultListModel()); this.activeApplications.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION); this.activeApplications.setBorder(BorderFactory.createLineBorder(Color.GRAY, 2)); this.activeApplications.addListSelectionListener(new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent listSelectionEvent) { int selected = activeApplications.getSelectedIndex(); if (selected >= 0) { descApplication(appOptionsList.get(selected)); } } }); panel.add(this.activeApplications, "0,2,0,2"); return panel; }
Example #19
Source File: OpenFinDockingDemo.java From java-example with MIT License | 5 votes |
private JPanel layoutCenterPanel() { JPanel panel = new JPanel(); double size[][] = {{TableLayout.FILL}, {150, 150, TableLayout.FILL}}; panel.setLayout(new TableLayout(size)); return panel; }
Example #20
Source File: OpenFinDockingDemo.java From java-example with MIT License | 5 votes |
private JPanel layoutActionButtonPanel() { JPanel buttonPanel = new JPanel(); JPanel topPanel = new JPanel(); double size[][] = {{10, 190, 20, 190, 10}, {25, 10, 25, 10}}; topPanel.setLayout(new TableLayout(size)); topPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createBevelBorder(2), "Desktop")); launch = new JButton("Launch OpenFin"); launch.setActionCommand("start"); close = new JButton("Shutdown OpenFin"); close.setActionCommand("close"); topPanel.add(launch, "1,0,1,0"); topPanel.add(close, "3,0,3,0"); undockButton = new JButton("Undock"); undockButton.setActionCommand("undock-window"); undockButton.setEnabled(false); topPanel.add(undockButton, "1,2,1,2"); close.addActionListener(this); launch.addActionListener(this); undockButton.addActionListener(this); buttonPanel.add(topPanel, "0,0"); return buttonPanel; }
Example #21
Source File: OpenFinDockingDemo.java From java-example with MIT License | 5 votes |
private JPanel layoutLeftPanel() { JPanel panel = new JPanel(); double size[][] = {{410}, {120, 30, TableLayout.FILL}}; panel.setLayout(new TableLayout(size)); panel.add(layoutActionButtonPanel(), "0,0,0,0"); panel.add(layoutDockStatus(), "0,1,0,1"); panel.add(layoutStatusPanel(), "0, 2, 0, 2"); return panel; }
Example #22
Source File: OpenFinDesktopDemo.java From java-example with MIT License | 5 votes |
private JPanel layoutActionButtonPanel() { JPanel buttonPanel = new JPanel(); JPanel topPanel = new JPanel(); double size[][] = {{0.5, 0.5}, {30}}; topPanel.setLayout(new TableLayout(size)); topPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createBevelBorder(2), "Desktop")); launch = new JButton("Start"); launch.setActionCommand("start"); close = new JButton("Close"); close.setActionCommand("close"); topPanel.add(launch, "0,0,0,0"); topPanel.add(close, "1,0,1,0"); size = new double[][]{{TableLayout.FILL}, {60, 30, 30, 30}}; buttonPanel.setLayout(new TableLayout(size)); createApplication = new JButton("Create Application"); createApplication.setActionCommand("create-application"); createNotification = new JButton("Create Notification"); createNotification.setActionCommand("create-notification"); close.addActionListener(this); launch.addActionListener(this); createApplication.addActionListener(this); createNotification.addActionListener(this); buttonPanel.add(topPanel, "0,0"); buttonPanel.add(createApplication, "0,1"); buttonPanel.add(createNotification, "0,2"); return buttonPanel; }
Example #23
Source File: OpenFinDesktopDemo.java From java-example with MIT License | 5 votes |
private JPanel layoutCenterPanel() { JPanel panel = new JPanel(); double size[][] = {{TableLayout.FILL}, {150, 150, TableLayout.FILL}}; panel.setLayout(new TableLayout(size)); panel.add(layoutAppDescriptionPanel(), "0,0,0,0"); panel.add(layoutWindowControlPanel(), "0,1,0,1"); panel.add(layoutStatusPanel(), "0,2,0,2"); return panel; }
Example #24
Source File: TableLayout.java From CXTouch with GNU General Public License v3.0 | 5 votes |
/** * Constructs an instance of TableLayout. * * @param size widths of columns and heights of rows in the format, * {{col0, col1, col2, ..., colN}, {row0, row1, row2, ..., rowM}} * If this parameter is invalid, the TableLayout will have * exactly one row and one column. */ public TableLayout (double [][] size) { // Make sure columns and rows and nothing else is specified if ((size != null) && (size.length == 2)) init(size[C], size[R]); else throw new IllegalArgumentException ("Parameter size should be an array, a[2], where a[0] is the " + "is an array of column widths and a[1] is an array or row " + "heights."); }
Example #25
Source File: ReachAssertionDialog.java From workcraft with MIT License | 5 votes |
@Override public JPanel createContentPanel() { JPanel result = super.createContentPanel(); result.setLayout(GuiUtils.createTableLayout( new double[]{TableLayout.FILL}, new double[]{TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.FILL})); result.add(createOptionsPanel(), new TableLayoutConstraints(0, 1)); result.add(createPropertyPanel(), new TableLayoutConstraints(0, 2)); // Preset panel has to be created the last as its guiMapper refers to other controls presetPanel = createPresetPanel(); result.add(presetPanel, new TableLayoutConstraints(0, 0)); return result; }
Example #26
Source File: HandshakeWizardDialog.java From workcraft with MIT License | 5 votes |
@Override public JPanel createContentPanel() { JPanel result = super.createContentPanel(); result.setLayout(GuiUtils.createTableLayout( new double[]{TableLayout.FILL}, new double[]{TableLayout.PREFERRED, TableLayout.FILL})); result.add(createOptionsPanel(), new TableLayoutConstraints(0, 1)); // Preset panel has to be created the last as its guiMapper refers to other controls presetPanel = createPresetPanel(); result.add(presetPanel, new TableLayoutConstraints(0, 0)); return result; }
Example #27
Source File: SQLViewPanel.java From nextreports-designer with Apache License 2.0 | 5 votes |
private JPanel createMaxRowsPanel() { JPanel maxRowsPanel = new JPanel(); double[] columns = { TableLayoutConstants.PREFERRED, 3, TableLayoutConstants.PREFERRED }; double[] rows = { TableLayoutConstants.PREFERRED, }; TableLayout layout = new TableLayout(columns, rows); maxRowsPanel.setLayout(layout); maxRowsCheckBox = new JCheckBox(I18NSupport.getString("max.rows")); maxRowsCheckBox.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED) { maxRowsTextField.setEditable(true); } else { maxRowsTextField.setEditable(false); } } }); maxRowsPanel.add(maxRowsCheckBox, "0, 0"); maxRowsTextField = new IntegerTextField(); maxRowsTextField.setText("500"); maxRowsTextField.setColumns(7); maxRowsPanel.add(maxRowsTextField, "2, 0"); // enable max rows feature enableMaxCheck(); return maxRowsPanel; }
Example #28
Source File: CreateOrEditElementListDialog.java From ramus with GNU General Public License v3.0 | 5 votes |
private void init() { double[][] size = { {DIV_SPACE, TableLayout.MINIMUM, DIV_SPACE, TableLayout.FILL, DIV_SPACE}, {DIV_SPACE, TableLayout.FILL, DIV_SPACE}}; JPanel panel = new JPanel(new TableLayout(size)); panel.add( new JLabel(GlobalResourcesManager.getString("ElementListName")), "1, 1"); panel.add(nameField, "3, 1"); Attribute attribute = getAttribute(); if (attribute != null) nameField.setText(attribute.getName()); JPanel main = new JPanel(new BorderLayout()); main.add(panel, BorderLayout.NORTH); AttributePlugin attributePlugin = framework .findAttributePlugin(getAttributeType()); editor = (ElementListPreferenciesEditor) attributePlugin .getAttributePreferenciesEditor(); JPanel panel2 = new JPanel(new BorderLayout()); panel2.add(editor.createComponent(getAttribute(), engine, rules), BorderLayout.CENTER); main.add(panel2, BorderLayout.CENTER); setMainPane(main); }
Example #29
Source File: PieChartSetupEditor.java From ramus with GNU General Public License v3.0 | 5 votes |
@Override public JComponent createComponent(GUIFramework framework, Element element) { JComponent component = super.createComponent(framework, element); final ChartSource source = getChartSource(); initAttributes(framework.getEngine()); key.setSelectedItem(source.getAttributeProperty(PIE_ATTRIBUTE_KEY)); value.setSelectedItem(source.getAttributeProperty(PIE_ATTRIBUTE_VALUE)); double[][] size = { {5, TableLayout.MINIMUM, TableLayout.FILL, TableLayout.MINIMUM, TableLayout.FILL, 5}, {5, TableLayout.FILL, 5}}; TableLayout layout = new TableLayout(size); layout.setHGap(5); layout.setVGap(5); JPanel panel = new JPanel(layout); panel.add(new JLabel(ChartResourceManager.getString("Chart.key")), "1,1"); panel.add(key, "2,1"); panel.add(new JLabel(ChartResourceManager.getString("Chart.value")), "3,1"); panel.add(value, "4,1"); JPanel panel2 = new JPanel(new BorderLayout()); panel2.add(component, BorderLayout.CENTER); panel2.add(panel, BorderLayout.SOUTH); return panel2; }
Example #30
Source File: Preferences.java From ramus with GNU General Public License v3.0 | 5 votes |
private void init() { double[][] size = { {5, TableLayout.MINIMUM, 5, TableLayout.FILL}, {5, TableLayout.MINIMUM, 5, TableLayout.MINIMUM, 5, TableLayout.MINIMUM, 5, TableLayout.MINIMUM, 5}}; this.setTitle(getString("Preferences.Title")); JPanel panel = new JPanel(new TableLayout(size)); JLabel path = new JLabel(getString("Base.Location")); panel.add(path, "1, 1"); panel.add(createLocationSector(), "3, 1"); panel.add(new JLabel(getString("WebPort")), "1, 3"); panel.add(webPort, "3, 3"); //panel.add(new JLabel(), "1, 5"); panel.add(canUndoRedo, "3, 5"); //panel.add(new JLabel(), "1, 7"); panel.add(autostart, "3, 7"); setMainPane(panel); pack(); centerDialog(); setResizable(false); }