private static Box getNewFilter() { Box filter = Box.createHorizontalBox(); FilterType[] filterTypeOptions = FilterType.values(); JComboBox filterTypes = new JComboBox(filterTypeOptions ); filterTypes.setEditable(false); filter.add(filterTypes); filter.add(Box.createHorizontalGlue()); JTextField filterInput = new JTextField(); //filterInput.setMaximumSize(new Dimension(50,50)); filterInput.setEditable(true); filter.add(filterInput); return filter; }
private Box makeTSurgeonScriptArea() { Box tsurgeonBox = Box.createHorizontalBox(); scriptLabel = new JLabel("Tsurgeon script: "); tsurgeonScript = new JTextArea(); tsurgeonScript.setBorder(BorderFactory.createEmptyBorder()); tsurgeonScript.setFocusTraversalKeysEnabled(true); JScrollPane scriptScroller = new JScrollPane(tsurgeonScript); scriptScroller.setBorder(BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.LOWERED)); //scriptScroller.setEnabled(tsurgeonEnabled); tsurgeonBox.add(scriptLabel); tsurgeonBox.add(scriptScroller); //tsurgeonBox.setBorder(BorderFactory.createEtchedBorder()); return tsurgeonBox; }
private JPanel makeFoundStatsBox() { JPanel foundStatsBox = new JPanel(); foundStatsBox.setLayout(new GridBagLayout()); Box labelBox = Box.createHorizontalBox(); foundStats = new JLabel(" "); labelBox.add(foundStats); historyButton = new JButton("Statistics"); historyButton.setEnabled(false); historyButton.addActionListener(this); GridBagConstraints c = new GridBagConstraints(); c.fill = GridBagConstraints.BOTH; c.weightx = 1.7; foundStatsBox.add(labelBox,c); c.weightx = .3; c.gridwidth = 1; foundStatsBox.add(historyButton); return foundStatsBox; }
private void init() { // WARNING: called from ctor so must not be overridden (i.e. must be private or final) setLayout(new BorderLayout()); setBorder(makeBorder()); Box box = Box.createVerticalBox(); box.add(makeTitlePanel()); box.add(createSignaturePanel()); box.add(createSignerPanel()); box.add(createMessagePositionPanel()); add(box, BorderLayout.NORTH); }
private Component createAuthorPanel() { Box box = new Box(BoxLayout.LINE_AXIS); final JLabel label = new JLabel("Author: "); final Font font = label.getFont().deriveFont(Font.BOLD); label.setFont(font); label.setAlignmentX(0.0f); box.add(label); authorLabel.setFont(font); box.add(authorLabel); box.add(Box.createHorizontalGlue()); return box; }
main_box.add(Box.createVerticalStrut(10)); main_box.add(cluster); cluster.setAlignmentX(Component.LEFT_ALIGNMENT); main_box.add(Box.createVerticalStrut(10)); main_box.add(Box.createVerticalStrut(10)); main_box.add(users_label); main_box.add(Box.createVerticalStrut(10)); txtArea.setPreferredSize(new Dimension(550, 500)); txtArea.setEditable(false); txtArea.setBackground(Color.white); main_box.add(txtArea); main_box.add(Box.createVerticalStrut(10)); main_box.add(input); main_box.add(Box.createVerticalStrut(10)); main_box.add(buttons); csLabel.setPreferredSize(new Dimension(85, 30)); input.add(csLabel); input.add(txtField); buttons.add(leaveButton); leaveButton.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { buttons.add(sendButton);
public void actionPerformed(final ActionEvent arg0) { Box box = Box.createVerticalBox(); final String about1 = TextUtils.getText("LatexInsertLatexAction.msg1"); box.add(new JLabel(about1)); addUriWithoutTitle(box, "LaTeX_in_freeplane_url"); final String about2 = TextUtils.getText("LatexInsertLatexAction.msg2"); box.add(new JLabel(about2)); JOptionPane.showMessageDialog(UITools.getCurrentRootComponent(), box, TextUtils .getText("LatexInsertLatexAction.text"), JOptionPane.INFORMATION_MESSAGE); }
Box box = Box.createVerticalBox(); JLabel label1 = new JLabel("test1, the beginning"); label1.setAlignmentX(Component.RIGHT_ALIGNMENT); box.add(label1); JLabel label2 = new JLabel("test2, some more"); label2.setAlignmentX(Component.RIGHT_ALIGNMENT); box.add(label2); JLabel label3 = new JLabel("test3"); label3.setAlignmentX(Component.RIGHT_ALIGNMENT); box.add(label3); add(box);
private void initialize() { setStyle(createGroupStyle()); Box box = Box.createVerticalBox(); add(box); box.setMinimumSize(new Dimension(200, 120)); box.setPreferredSize(new Dimension(200, 120)); Component c = Box.createGlue(); c.setSize(160, 100); c.setMinimumSize(new Dimension(160, 100)); final ResizableContainer rc = new ResizableContainer(c, this); box.add(rc); }
private JPanel getParamsPanel() { JPanel paramsPanel = new JPanel(); Box b2 = Box.createVerticalBox(); JComponent indTestParamBox = getIndTestParamBox(); if (indTestParamBox != null) { b2.add(indTestParamBox); } paramsPanel.add(b2); paramsPanel.setBorder(new TitledBorder("Parameters")); return paramsPanel; }
private Component createGeneralTab() { JPanel panel = new JPanel(new FlowLayout(LEFT)); Box box = createHorizontalBox(); box.add(logo()); panel.add(box); return panel; }
super(new BorderLayout()); ID_TOOLWINDOW, treeActionGroup, false); final Box toolBarBox = Box.createHorizontalBox(); toolBarBox.add(mainToolbar.getComponent()); toolBarBox.add(treeToolbar.getComponent());
public static Box createVerticalBox( Component... cs ) { Box box = Box.createVerticalBox( ); for ( Component c : cs ) box.add( c ); return box; }
static JComponent leftBox(final JComponent c) { final Box b = new Box(BoxLayout.X_AXIS); b.add(c); b.add(Box.createHorizontalGlue()); return b; }
private void initUI() { JLabel findLabel = new JLabel(NLS.str("search_dialog.open_by_name")); searchField = new JTextField(); searchField.setAlignmentX(LEFT_ALIGNMENT); JCheckBox codeChBox = makeOptionsCheckBox(NLS.str("search_dialog.code"), SearchOptions.CODE); JPanel searchInPanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); searchInPanel.setBorder(BorderFactory.createTitledBorder(NLS.str("search_dialog.search_in"))); searchInPanel.add(clsChBox); searchInPanel.add(codeChBox); JPanel searchOptions = new JPanel(new FlowLayout(FlowLayout.LEFT)); searchOptions.setBorder(BorderFactory.createTitledBorder(NLS.str("search_dialog.options"))); searchOptions.add(caseChBox); Box box = Box.createHorizontalBox(); box.setAlignmentX(LEFT_ALIGNMENT); box.add(searchInPanel); box.add(searchOptions);
void addComponent(String name, Component c) { Box box = Box.createHorizontalBox(); box.add(new JLabel(name)); box.add(c); add(box); if (c instanceof JCheckBox) { checkboxes.addElement(c); } else if (c instanceof JComboBox) { choices.addElement(c); } else if (c instanceof JList) { lists.addElement(c); } }
private void init() { // WARNING: called from ctor so must not be overridden (i.e. must be private or final) setLayout(new BorderLayout()); setBorder(makeBorder()); Box box = Box.createVerticalBox(); box.add(makeTitlePanel()); box.add(createSaveConditionsPanel()); box.add(createSaveFormatPanel()); add(box, BorderLayout.NORTH); }
private Component createAuthorPanel() { Box box = new Box(BoxLayout.LINE_AXIS); final JLabel label = new JLabel("Author: "); final Font font = label.getFont().deriveFont(8); label.setFont(font); label.setAlignmentX(0.0f); box.add(label); authorLabel = new JLabel(""); authorLabel.setFont(font); box.add(authorLabel); box.add(Box.createHorizontalGlue()); return box; }