List of usage examples for javax.swing.border BevelBorder LOWERED
int LOWERED
To view the source code for javax.swing.border BevelBorder LOWERED.
Click Source Link
From source file:org.mbs3.juniuploader.gui.pnlFormVariables.java
private void initGUI() { try {/*from w ww. ja v a2s . co m*/ GridBagLayout thisLayout = new GridBagLayout(); this.setLayout(thisLayout); { btnAddPair = new JButton(); this.add(btnAddPair, new GridBagConstraints(3, 3, 3, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); btnAddPair.setText("Add a New Pair"); btnAddPair.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { btnAddPairActionPerformed(evt); } }); } { btnRemPair = new JButton(); this.add(btnRemPair, new GridBagConstraints(3, 6, 3, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); btnRemPair.setText("Remove Selected Pair"); btnRemPair.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { btnRemPairActionPerformed(evt); } }); } { cmbFormGroups = new JComboBox(); this.add(cmbFormGroups, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); cmbFormGroups.setModel(frmMain.formGroups); cmbFormGroups.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent evt) { cmbFormGroupsItemStateChanged(evt); } }); } { DefaultComboBoxModel groups = frmMain.formGroups; FormPairGroup fpg = (FormPairGroup) groups.getSelectedItem(); DefaultComboBoxModel dcbmFormPairs; if (fpg != null) dcbmFormPairs = new DefaultComboBoxModel(fpg.getPairs()); else dcbmFormPairs = new DefaultComboBoxModel(); lstFormPairValues = new JList(); lstFormPairValues.setModel(dcbmFormPairs); this.add(lstFormPairValues, new GridBagConstraints(1, 3, 1, 4, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); lstFormPairValues.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED)); } { btnAddGroup = new JButton(); this.add(btnAddGroup, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); btnAddGroup.setText("Add a Group"); btnAddGroup.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { btnAddGroupActionPerformed(evt); } }); } { btnRemSelGrp = new JButton(); this.add(btnRemSelGrp, new GridBagConstraints(5, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); btnRemSelGrp.setText("Remove This Group"); btnRemSelGrp.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { btnRemSelGrpActionPerformed(evt); } }); } { btnEditPair = new JButton(); this.add(btnEditPair, new GridBagConstraints(3, 4, 3, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); btnEditPair.setText("Edit This Pair"); btnEditPair.setEnabled(false); } thisLayout.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.1, 0.1, 0.0, 0.1, 0.0 }; thisLayout.rowHeights = new int[] { 8, 24, 9, 20, 7, 8, 7, 9 }; thisLayout.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; thisLayout.columnWidths = new int[] { 11, 335, 9, 97, 10, 119, 10 }; this.setPreferredSize(new java.awt.Dimension(614, 382)); } catch (Exception e) { e.printStackTrace(); } }
From source file:org.mbs3.juniuploader.gui.pnlUploadSites.java
private void initGUI() { try {/* ww w .jav a2 s. com*/ GridBagLayout thisLayout = new GridBagLayout(); this.setLayout(thisLayout); { btnAddSite = new JButton(); this.add(btnAddSite, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); btnAddSite.setText("Add Site to List"); btnAddSite.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { btnAddSiteActionPerformed(evt); } }); } { btnRemoveSite = new JButton(); this.add(btnRemoveSite, new GridBagConstraints(3, 4, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); btnRemoveSite.setText("Remove Selected Site"); btnRemoveSite.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { btnRemoveSiteActionPerformed(evt); } }); } { jScrollPane1 = new JScrollPane(); this.add(jScrollPane1, new GridBagConstraints(1, 1, 1, 4, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); jScrollPane1.setPreferredSize(new java.awt.Dimension(367, 362)); { lstUploadSites = new JList(); jScrollPane1.setViewportView(lstUploadSites); lstUploadSites.setModel(frmMain.uploadLocations); lstUploadSites.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED)); } } thisLayout.rowWeights = new double[] { 0.0, 0.1, 0.1, 0.0, 0.1, 0.0 }; thisLayout.rowHeights = new int[] { 9, 20, 7, 8, 7, 9 }; thisLayout.columnWeights = new double[] { 0.0, 0.1, 0.0, 0.0, 0.0 }; thisLayout.columnWidths = new int[] { 11, 20, 9, 217, 11 }; this.setPreferredSize(new java.awt.Dimension(614, 382)); } catch (Exception e) { e.printStackTrace(); } }
From source file:org.mbs3.juniuploader.gui.pnlWoWDirectories.java
private void initGUI() { try {/*from w w w. java 2 s. co m*/ GridBagLayout thisLayout = new GridBagLayout(); this.setLayout(thisLayout); { /*dlmWoWDirs = new DefaultListModel(); Vector dirs = frmMain.getUploader().getLocalSystem().getWowDirectories(); Iterator i = dirs.iterator(); while(i.hasNext()) dlmWoWDirs.addElement(i.next()); */ lstWoWDirs = new JList(); //dlmWoWDirs); lstWoWDirs.setModel(frmMain.wowDirectories); this.add(lstWoWDirs, new GridBagConstraints(1, 1, 1, 4, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); lstWoWDirs.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED)); } { btnAddDirectory = new JButton(); this.add(btnAddDirectory, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); btnAddDirectory.setText("Add Directory to List"); btnAddDirectory.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { btnAddDirectoryActionPerformed(evt); } }); } { btnRemoveSelected = new JButton(); this.add(btnRemoveSelected, new GridBagConstraints(3, 4, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 0), 0, 0)); btnRemoveSelected.setText("Remove Selected Directory"); btnRemoveSelected.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { btnRemoveSelectedActionPerformed(evt); } }); } thisLayout.rowWeights = new double[] { 0.0, 0.1, 0.1, 0.0, 0.1, 0.0 }; thisLayout.rowHeights = new int[] { 9, 20, 7, 8, 7, 9 }; thisLayout.columnWeights = new double[] { 0.0, 0.1, 0.0, 0.0, 0.0 }; thisLayout.columnWidths = new int[] { 11, 20, 9, 217, 11 }; this.setPreferredSize(new java.awt.Dimension(614, 382)); } catch (Exception e) { e.printStackTrace(); } }
From source file:org.openmicroscopy.shoola.util.ui.UIUtilities.java
/** * Sets the defaults for the specified area. * /*from w w w.j a v a 2 s. c om*/ * @param area The text area. */ public static void setTextAreaDefault(JComponent area) { if (area == null) return; area.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED)); //area.setForeground(STEELBLUE); area.setBackground(BACKGROUND); area.setOpaque(true); if (area instanceof JTextComponent) ((JTextComponent) area).setEditable(true); }
From source file:org.openmrs.module.muzimabiometrics.panels.EnrollFromScanner.java
@Override protected void initGUI() { panelMain = new JPanel(); panelScanners = new JPanel(); scrollPaneList = new JScrollPane(); scannerList = new JList(); panelButtons = new JPanel(); btnRefresh = new JButton(); btnScan = new JButton(); btnCancel = new JButton(); btnForce = new JButton(); cbAutomatic = new JCheckBox(); scrollPane = new JScrollPane(); panelSouth = new JPanel(); panelInfo = new JPanel(); lblInfo = new JLabel(); panelSave = new JPanel(); btnIdentifyPatient = new JButton(); btnRegisterPatient = new JButton(); cbShowProcessed = new JCheckBox(); setLayout(new BorderLayout()); panelMain.setLayout(new BorderLayout()); panelScanners.setBorder(BorderFactory.createTitledBorder("Scanners list")); panelScanners.setLayout(new BorderLayout()); scrollPaneList.setPreferredSize(new Dimension(0, 90)); scannerList.setModel(new DefaultListModel()); scannerList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); scannerList.setBorder(LineBorder.createBlackLineBorder()); scrollPaneList.setViewportView(scannerList); panelScanners.add(scrollPaneList, BorderLayout.CENTER); panelButtons.setLayout(new FlowLayout(FlowLayout.LEADING)); btnRefresh.setText("Refresh list"); panelButtons.add(btnRefresh);//from w w w. j a v a 2 s.co m btnScan.setText("Scan"); panelButtons.add(btnScan); btnCancel.setText("Cancel"); btnCancel.setEnabled(false); panelButtons.add(btnCancel); btnForce.setText("Force"); panelButtons.add(btnForce); cbAutomatic.setSelected(true); cbAutomatic.setText("Scan automatically"); panelButtons.add(cbAutomatic); panelScanners.add(panelButtons, BorderLayout.SOUTH); panelMain.add(panelScanners, BorderLayout.NORTH); panelMain.add(scrollPane, BorderLayout.CENTER); panelSouth.setLayout(new BorderLayout()); panelInfo.setBorder(new SoftBevelBorder(BevelBorder.LOWERED)); panelInfo.setLayout(new GridLayout(1, 1)); lblInfo.setText(" "); panelInfo.add(lblInfo); panelSouth.add(panelInfo, BorderLayout.NORTH); panelSave.setLayout(new FlowLayout(FlowLayout.LEADING)); btnIdentifyPatient.setText("Scan fingerprint"); btnIdentifyPatient.setEnabled(true); panelSave.add(btnIdentifyPatient); btnRegisterPatient.setText("Register Patient"); btnRegisterPatient.setEnabled(true); panelSave.add(btnRegisterPatient); cbShowProcessed.setSelected(true); cbShowProcessed.setText("Show processed image"); panelSave.add(cbShowProcessed); panelSouth.add(panelSave, BorderLayout.SOUTH); panelMain.add(panelSouth, BorderLayout.SOUTH); add(panelMain, BorderLayout.CENTER); panelLicensing = new LicensingPanel(requiredLicenses, optionalLicenses); add(panelLicensing, java.awt.BorderLayout.NORTH); fcImage = new JFileChooser(); fcImage.setFileFilter(new Utils.ImageFileFilter(NImages.getSaveFileFilter())); fcTemplate = new JFileChooser(); view = new NFingerView(); view.setShownImage(ShownImage.RESULT); view.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent ev) { super.mouseClicked(ev); if (ev.getButton() == MouseEvent.BUTTON3) { cbShowProcessed.doClick(); } } }); scrollPane.setViewportView(view); btnRefresh.addActionListener(this); btnScan.addActionListener(this); btnCancel.addActionListener(this); btnForce.addActionListener(this); btnIdentifyPatient.addActionListener(this); btnRegisterPatient.addActionListener(this); cbShowProcessed.addActionListener(this); scannerList.addListSelectionListener(new ScannerSelectionListener()); }
From source file:org.pentaho.ui.xul.swing.tags.SwingDialog.java
private void createDialog() { if (getParent() instanceof XulDialog) { Object parentObj = ((SwingDialog) getParent()).getDialog(); dialog = new JDialog((Dialog) parentObj); centerComp = (Component) parentObj; } else if (getParent() instanceof XulWindow) { Object parentObj = getParent().getManagedObject(); dialog = new JDialog((Frame) parentObj); centerComp = (Component) parentObj; } else {/*from w ww . j a va2s. c om*/ Document doc = getDocument(); Element rootElement = doc.getRootElement(); XulWindow window = null; if (rootElement != this) { // dialog is root, no JFrame Parent window = (XulWindow) rootElement; } if (window != null) { frame = (JFrame) window.getManagedObject(); dialog = new JDialog(frame); centerComp = frame; } else { final Object context = domContainer.getOuterContext(); if (context instanceof JFrame) { frame = (JFrame) context; centerComp = (Component) context; dialog = new JDialog(frame); } else if (context instanceof JDialog) { dialog = new JDialog((JDialog) context); centerComp = (Component) context; } else if (context instanceof JComponent) { dialog = new JDialog(); centerComp = (Component) context; } else { dialog = new JDialog(); } } } dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); dialog.setResizable(getResizable()); dialog.setLayout(new BorderLayout()); JPanel mainPanel = new JPanel(new BorderLayout()); mainPanel.setOpaque(true); int pad = (this.getPadding() > -1) ? getPadding() : 3; mainPanel.setBorder(BorderFactory.createEmptyBorder(pad, pad, pad, pad)); dialog.setTitle(title); dialog.setModal(isModal()); dialog.add(mainPanel, BorderLayout.CENTER); mainPanel.add(container, BorderLayout.CENTER); container.setOpaque(false); if (this.header != null) { JPanel headerPanel = new JPanel(new BorderLayout()); headerPanel.setBackground(Color.decode("#5F86C0")); headerPanel.setOpaque(true); JPanel headerPanelInner = new JPanel(new BorderLayout()); headerPanelInner.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3)); headerPanelInner.setOpaque(false); headerPanel.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED, Color.decode("#8FB1E5"), Color.decode("#446CA9"))); JLabel title = new JLabel(this.header.getTitle()); title.setForeground(Color.white); headerPanelInner.add(title, BorderLayout.WEST); JLabel desc = new JLabel(this.header.getDescription()); desc.setForeground(Color.white); headerPanelInner.add(desc, BorderLayout.EAST); headerPanel.add(headerPanelInner, BorderLayout.CENTER); mainPanel.add(headerPanel, BorderLayout.NORTH); } populateButtonPanel(); mainPanel.add(buttonPanel, BorderLayout.SOUTH); dialog.setSize(new Dimension(getWidth(), getHeight())); dialog.setPreferredSize(new Dimension(getWidth(), getHeight())); dialog.setMinimumSize(new Dimension(getWidth(), getHeight())); if (this.getBgcolor() != null) { mainPanel.setBackground(Color.decode(this.getBgcolor())); } }
From source file:org.springframework.richclient.application.statusbar.support.DefaultStatusBar.java
/** * Create the <code>JLabel</code> used to render the messages. * <p>// w w w. j a v a2s .c o m * Can safely be overridden to customize the label * * @return the <code>JLabel</code> */ protected JLabel createMessageLabel() { JLabel messageLabel = new JLabel(" "); messageLabel.setName("message"); Border bevelBorder = BorderFactory.createBevelBorder(BevelBorder.LOWERED, UIManager.getColor("controlHighlight"), UIManager.getColor("controlShadow")); Border emptyBorder = BorderFactory.createEmptyBorder(1, 3, 1, 3); messageLabel.setBorder(BorderFactory.createCompoundBorder(bevelBorder, emptyBorder)); return messageLabel; }
From source file:pcgen.gui2.dialog.AboutDialog.java
/** * Construct the includes panel. This panel shows details * and licencing statrements about any libraries distributed * with PCGen./*ww w . j a v a 2 s.c o m*/ * * @return The includes panel. */ private JPanel buildIncludesPanel() { JPanel iPanel = new JPanel(); JTextArea otherLibrariesField = new JTextArea(); iPanel.setLayout(new BorderLayout()); String s = LanguageBundle.getString("in_abt_lib_apache"); //$NON-NLS-1$ s += LanguageBundle.getString("in_abt_lib_jdom"); //$NON-NLS-1$ s += LanguageBundle.getString("in_abt_lib_l2f"); //$NON-NLS-1$ otherLibrariesField.setText(s); otherLibrariesField.setWrapStyleWord(true); otherLibrariesField.setLineWrap(true); otherLibrariesField.setEditable(false); otherLibrariesField.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED)); iPanel.add(otherLibrariesField, BorderLayout.CENTER); return iPanel; }
From source file:plugin.notes.gui.NotesView.java
/** * Sets a border of an editing button to indicate that the function of the * button is active according to the text location of the cursor * *@param button Button to highlight/* w ww. j av a 2 s .c o m*/ */ private void highlightButton(JButton button) { button.setBorder(new BevelBorder(BevelBorder.LOWERED)); }
From source file:storybook.toolkit.swing.SwingUtil.java
public static JPanel createNotesPanel(JTextArea taNotes) { MigLayout layout = new MigLayout("fill", "", "[top]"); JPanel panel = new JPanel(layout); taNotes.setLineWrap(true);/* ww w . j a v a2s . c om*/ taNotes.setWrapStyleWord(true); taNotes.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED)); JScrollPane scroller = new JScrollPane(taNotes); scroller.setPreferredSize(new Dimension(400, 400)); panel.add(scroller, "grow"); return panel; }