List of usage examples for javax.swing BorderFactory createMatteBorder
public static MatteBorder createMatteBorder(int top, int left, int bottom, int right, Icon tileIcon)
From source file:com.mirth.connect.client.ui.panels.connectors.DestinationSettingsPanel.java
private void initComponents() { setLayout(new MigLayout("insets 4 8 4 4, novisualpadding, hidemode 3, fill", "[]13[grow]")); setBackground(UIConstants.BACKGROUND_COLOR); setBorder(BorderFactory.createTitledBorder( BorderFactory.createMatteBorder(1, 0, 0, 0, new Color(204, 204, 204)), "Destination Settings", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Tahoma", 1, 11))); queueMessagesLabel = new JLabel("Queue Messages:"); ButtonGroup queueMessagesButtonGroup = new ButtonGroup(); ActionListener queueMessagesActionListener = new ActionListener() { @Override/*ww w . j a va2s . c om*/ public void actionPerformed(ActionEvent evt) { updateQueueMessages(); } }; queueMessagesNeverRadio = new MirthRadioButton("Never"); queueMessagesNeverRadio.setBackground(getBackground()); queueMessagesNeverRadio.setToolTipText("Disable the destination queue."); queueMessagesNeverRadio.addActionListener(queueMessagesActionListener); queueMessagesButtonGroup.add(queueMessagesNeverRadio); queueMessagesOnFailureRadio = new MirthRadioButton("On Failure"); queueMessagesOnFailureRadio.setBackground(getBackground()); queueMessagesOnFailureRadio.setToolTipText( "<html>Attempt to send the message first before queueing it. This will allow subsequent<br/>destinations and the Postprocessor to use the response from this destination if it<br/>successfully sends before queueing.</html>"); queueMessagesOnFailureRadio.addActionListener(queueMessagesActionListener); queueMessagesButtonGroup.add(queueMessagesOnFailureRadio); queueMessagesAlwaysRadio = new MirthRadioButton("Always"); queueMessagesAlwaysRadio.setBackground(getBackground()); queueMessagesAlwaysRadio.setToolTipText( "<html>Immediately queue the message. Subsequent destinations and the<br/>Postprocessor will always see this destination's response as QUEUED.</html>"); queueMessagesAlwaysRadio.addActionListener(queueMessagesActionListener); queueMessagesButtonGroup.add(queueMessagesAlwaysRadio); queueMessagesWarningLabel = new JLabel(); queueMessagesWarningLabel.setForeground(Color.RED); advancedQueueSettingsLabel = new JLabel("Advanced Queue Settings:"); advancedQueueSettingsButton = new JButton(new ImageIcon(Frame.class.getResource("images/wrench.png"))); advancedQueueSettingsButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent evt) { new AdvancedDialog(); } }); advancedQueueSettingsValueLabel = new JLabel(); validateResponseLabel = new JLabel("Validate Response:"); ButtonGroup validateResponseButtonGroup = new ButtonGroup(); String toolTipText = "<html>Select Yes to validate the response. Responses can only be validated if the<br>response transformer's inbound properties contains a <b>Response Validation</b><br>section. If validation fails, the message will be marked as queued or errored.</html>"; validateResponseYesRadio = new MirthRadioButton("Yes"); validateResponseYesRadio.setBackground(getBackground()); validateResponseYesRadio.setToolTipText(toolTipText); validateResponseButtonGroup.add(validateResponseYesRadio); validateResponseNoRadio = new MirthRadioButton("No"); validateResponseNoRadio.setBackground(getBackground()); validateResponseNoRadio.setToolTipText(toolTipText); validateResponseButtonGroup.add(validateResponseNoRadio); }
From source file:com.intel.stl.ui.monitor.view.PSNodesDetailsPanel.java
/** * Description:/*from ww w . j a v a 2 s . com*/ * * @param name */ protected void initComponent() { setLayout(new BorderLayout(0, 0)); setOpaque(false); setBorder(BorderFactory.createTitledBorder((Border) null)); JPanel titlePanel = new JPanel(new BorderLayout(5, 1)); titlePanel.setOpaque(false); numberLabel = ComponentFactory.getH1Label(STLConstants.K0039_NOT_AVAILABLE.getValue(), Font.PLAIN); numberLabel.setHorizontalAlignment(JLabel.RIGHT); titlePanel.add(numberLabel, BorderLayout.CENTER); nameLabel = ComponentFactory.getH3Label("", Font.PLAIN); nameLabel.setHorizontalAlignment(JLabel.LEFT); nameLabel.setVerticalAlignment(JLabel.BOTTOM); titlePanel.add(nameLabel, BorderLayout.EAST); add(titlePanel, BorderLayout.NORTH); JPanel mainPanel = new JPanel(); mainPanel.setOpaque(false); mainPanel.setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 2)); GridBagLayout gridBag = new GridBagLayout(); mainPanel.setLayout(gridBag); GridBagConstraints gc = new GridBagConstraints(); gc.weighty = 0; gc.insets = new Insets(8, 2, 2, 2); gc.weightx = 1; gc.gridwidth = 1; gc.gridheight = 2; // gc.gridheight = 3; // Should change to 3 if we add Route typeChartPanel = new ChartPanel(null); typeChartPanel.setPreferredSize(new Dimension(80, 60)); mainPanel.add(typeChartPanel, gc); gc.fill = GridBagConstraints.BOTH; gc.insets = new Insets(12, 2, 2, 2); gc.weightx = 0; gc.gridheight = 1; swNumberLabel = createNumberLabel(); mainPanel.add(swNumberLabel, gc); gc.gridwidth = GridBagConstraints.REMAINDER; swNameLabel = createNameLabel(STLConstants.K0048_SWITCHES.getValue()); mainPanel.add(swNameLabel, gc); gc.insets = new Insets(2, 2, 6, 2); gc.gridwidth = 1; fiNumberLabel = createNumberLabel(); mainPanel.add(fiNumberLabel, gc); gc.gridwidth = GridBagConstraints.REMAINDER; fiNameLabel = createNameLabel(STLConstants.K0052_HOSTS.getValue()); mainPanel.add(fiNameLabel, gc); // gc.gridwidth = 1; // rtNumberLabel = ComponentFactory.getH4Label( // STLConstants.K0039_NOT_AVAILABLE.getValue(), Font.PLAIN); // rtNumberLabel.setHorizontalAlignment(JLabel.CENTER); // mainPanel.add(rtNumberLabel, gc); // // gc.gridwidth = GridBagConstraints.REMAINDER; // rtNameLabel = ComponentFactory.getH5Label( // STLConstants.K0050_ROUTERS.getValue(), Font.PLAIN); // rtNameLabel.setVerticalAlignment(JLabel.BOTTOM); // mainPanel.add(rtNameLabel, gc); add(mainPanel, BorderLayout.CENTER); JPanel bottomPanel = new JPanel(new GridBagLayout()); bottomPanel.setOpaque(false); bottomPanel.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, UIConstants.INTEL_BORDER_GRAY)); gc = new GridBagConstraints(); gc.insets = new Insets(0, 5, 1, 5); gc.fill = GridBagConstraints.BOTH; gc.weightx = 1; gc.gridheight = 2; otherPortsLabel = ComponentFactory.getH1Label(STLConstants.K0039_NOT_AVAILABLE.getValue(), Font.PLAIN); otherPortsLabel.setForeground(UIConstants.INTEL_GRAY); otherPortsLabel.setHorizontalAlignment(JLabel.RIGHT); bottomPanel.add(otherPortsLabel, gc); gc.gridwidth = GridBagConstraints.REMAINDER; gc.gridheight = 1; gc.weightx = 0; gc.weighty = 1; JLabel label = ComponentFactory.getH4Label(STLConstants.K1026_PORT_RESOURCE.getValue(), Font.PLAIN); label.setHorizontalAlignment(JLabel.LEFT); label.setVerticalAlignment(JLabel.BOTTOM); bottomPanel.add(label, gc); gc.weighty = 0; label = ComponentFactory.getH4Label(STLConstants.K2077_NOT_IN_FABRIC.getValue(), Font.PLAIN); label.setHorizontalAlignment(JLabel.LEFT); label.setVerticalAlignment(JLabel.BOTTOM); bottomPanel.add(label, gc); add(bottomPanel, BorderLayout.SOUTH); }
From source file:net.java.sip.communicator.impl.gui.main.chat.ChatPanel.java
/** * Creates a <tt>ChatPanel</tt> which is added to the given chat window. * * @param chatContainer The parent window of this chat panel. *///from www .j a v a2s. c o m public ChatPanel(ChatContainer chatContainer) { super(new BorderLayout()); this.chatContainer = chatContainer; this.conversationPanel = new ChatConversationPanel(this); this.conversationPanel.setPreferredSize(new Dimension(400, 200)); this.conversationPanel.getChatTextPane().setTransferHandler(new ChatTransferHandler(this)); this.conversationPanelContainer.add(conversationPanel, BorderLayout.CENTER); this.conversationPanelContainer.setBackground(Color.WHITE); initTypingNotificationLabel(conversationPanelContainer); topPanel.setBackground(Color.WHITE); topPanel.setBorder(BorderFactory.createMatteBorder(1, 0, 1, 0, Color.GRAY)); this.writeMessagePanel = new ChatWritePanel(this); this.messagePane.setBorder(null); this.messagePane.setOpaque(false); this.messagePane.addPropertyChangeListener(new DividerLocationListener()); this.messagePane.setDividerSize(3); this.messagePane.setResizeWeight(1.0D); this.messagePane.setBottomComponent(writeMessagePanel); this.messagePane.setTopComponent(topPanel); this.add(messagePane, BorderLayout.CENTER); if (OSUtils.IS_MAC) { setOpaque(true); setBackground(new Color(GuiActivator.getResources().getColor("service.gui.MAC_PANEL_BACKGROUND"))); } this.addComponentListener(new TabSelectionComponentListener()); }
From source file:eu.europa.esig.dss.applet.util.ComponentFactory.java
/** * @param currentStep/* ww w . j a v a2s . c om*/ * @param maxStep * @return */ public static JPanel createWizardStepPanel(final int currentStep, final int maxStep) { final List<String> colSpecs = new ArrayList<String>(); for (int i = 1; i <= maxStep; i++) { colSpecs.add("default:grow"); } final FormLayout layout = new FormLayout(StringUtils.join(colSpecs, ","), "pref"); final PanelBuilder builder = ComponentFactory.createBuilder(layout); final CellConstraints cc = new CellConstraints(); for (int i = 1; i <= maxStep; i++) { final JPanel subPanel = ComponentFactory .createPanel(i == currentStep ? DEFAULT_HIGHLIGHT : DEFAULT_BACKGROUND); subPanel.add(ComponentFactory.createLabel(String.valueOf(i))); final Border border = (i != maxStep) ? BorderFactory.createMatteBorder(0, 1, 0, 0, Color.GRAY) : BorderFactory.createMatteBorder(0, 1, 0, 1, Color.GRAY); subPanel.setBorder(border); builder.add(subPanel, cc.xy(i, 1)); } final JPanel panel = ComponentFactory.createPanel(builder); panel.setBorder(BorderFactory.createMatteBorder(1, 0, 1, 0, Color.GRAY)); return panel; }
From source file:com.prodigy4440.view.MainJFrame.java
public final void initComponents() { List<Image> icons = new LinkedList<>(); icons.add(new ImageIcon(getClass().getResource("/com/prodigy4440/ited16x16.png")).getImage()); icons.add(new ImageIcon(getClass().getResource("/com/prodigy4440/ited32x32.png")).getImage()); icons.add(new ImageIcon(getClass().getResource("/com/prodigy4440/ited48x48.png")).getImage()); icons.add(new ImageIcon(getClass().getResource("/com/prodigy4440/ited72x72.png")).getImage()); this.setIconImages(icons); ActionHandler actionHandler = new ActionHandler(this); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setSize(620, 520); this.setLocationRelativeTo(null); this.setTitle("Untitled Document- IgboTextEditor"); southJPanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); SoftBevelBorder sbb = new SoftBevelBorder(SoftBevelBorder.LOWERED); southJPanel.setBorder(sbb);//from w w w .j a v a2s . co m menuBar = new JMenuBar(); fileJMenu = new JMenu("File"); fileJMenu.setMnemonic('F'); editJMenu = new JMenu("Edit"); editJMenu.setMnemonic('E'); formatJMenu = new JMenu("Format"); formatJMenu.setMnemonic('A'); viewJMenu = new JMenu("View"); viewJMenu.setMnemonic('V'); helpJMenu = new JMenu("Help"); helpJMenu.setMnemonic('H'); newDocumentJMenuItem = new JMenuItem("New"); newDocumentJMenuItem.addActionListener(actionHandler); newDocumentJMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, Event.CTRL_MASK)); openJMenuItem = new JMenuItem("Open"); openJMenuItem.addActionListener(actionHandler); openJMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, Event.CTRL_MASK)); saveJMenuItem = new JMenuItem("Save"); saveJMenuItem.addActionListener(actionHandler); saveJMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, Event.CTRL_MASK)); printJMenuItem = new JMenuItem("Print"); printJMenuItem.addActionListener(actionHandler); printJMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_P, Event.CTRL_MASK)); exitJMenuItem = new JMenuItem("Exit"); exitJMenuItem.addActionListener(actionHandler); undoJMenuItem = new JMenuItem("Undo"); undoJMenuItem.addActionListener(actionHandler); undoJMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Z, Event.CTRL_MASK)); redoJMenuItem = new JMenuItem("Redo"); redoJMenuItem.addActionListener(actionHandler); redoJMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Y, Event.CTRL_MASK)); copyJMenuItem = new JMenuItem("Copy"); copyJMenuItem.addActionListener(actionHandler); copyJMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, Event.CTRL_MASK)); cutJMenuItem = new JMenuItem("Cut"); cutJMenuItem.addActionListener(actionHandler); cutJMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.CTRL_MASK)); pasteJMenuItem = new JMenuItem("Paste"); pasteJMenuItem.addActionListener(actionHandler); pasteJMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, Event.CTRL_MASK)); deleteJMenuItem = new JMenuItem("Delete"); deleteJMenuItem.addActionListener(actionHandler); deleteJMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_D, Event.CTRL_MASK)); selectAllJMenuItem = new JMenuItem("Select All"); selectAllJMenuItem.addActionListener(actionHandler); selectAllJMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A, Event.CTRL_MASK)); findJMenuItem = new JMenuItem("Find"); findJMenuItem.addActionListener(actionHandler); findJMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F, Event.CTRL_MASK)); replaceJMenuItem = new JMenuItem("Replace"); replaceJMenuItem.addActionListener(actionHandler); replaceJMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_R, Event.CTRL_MASK)); wordWrapJCheckBoxMenuItem = new JCheckBoxMenuItem("Word Wrap"); wordWrapJCheckBoxMenuItem.addActionListener(actionHandler); wordWrapJCheckBoxMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_W, Event.CTRL_MASK)); fontJMenuItem = new JMenuItem("Font"); fontJMenuItem.addActionListener(actionHandler); colorJMenuItem = new JMenuItem("Color"); colorJMenuItem.addActionListener(actionHandler); statusBarJCheckBoxMenuItem = new JCheckBoxMenuItem("Status Bar"); statusBarJCheckBoxMenuItem.addActionListener(actionHandler); statusBarJCheckBoxMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, Event.ALT_MASK)); helpJMenuItem = new JMenuItem("Help"); helpJMenuItem.addActionListener(actionHandler); helpJMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, Event.CTRL_MASK)); aboutJMenuItem = new JMenuItem("About"); aboutJMenuItem.addActionListener(actionHandler); statusJLabel = new JLabel("Status:"); //Main text area setup textArea = new JTextArea(); undoManager = new UndoManager(); wordSearcher = new WordSearcher(textArea); textArea.setBorder(BorderFactory.createMatteBorder(4, 4, 4, 4, Color.WHITE)); document = textArea.getDocument(); document.addUndoableEditListener(new UndoableEditListener() { @Override public void undoableEditHappened(UndoableEditEvent e) { undoManager.addEdit(e.getEdit()); } }); font = new Font("Tahoma", Font.PLAIN, 16); textArea.setFont(font); color = Color.BLUE; textArea.setForeground(color); undoManager = new UndoManager(); fileJMenu.add(newDocumentJMenuItem); fileJMenu.addSeparator(); fileJMenu.add(openJMenuItem); fileJMenu.add(saveJMenuItem); fileJMenu.addSeparator(); fileJMenu.add(printJMenuItem); fileJMenu.addSeparator(); fileJMenu.add(exitJMenuItem); editJMenu.add(undoJMenuItem); editJMenu.add(redoJMenuItem); editJMenu.addSeparator(); editJMenu.add(copyJMenuItem); editJMenu.add(cutJMenuItem); editJMenu.add(pasteJMenuItem); editJMenu.addSeparator(); editJMenu.add(deleteJMenuItem); editJMenu.add(selectAllJMenuItem); editJMenu.addSeparator(); editJMenu.add(findJMenuItem); editJMenu.add(replaceJMenuItem); formatJMenu.add(wordWrapJCheckBoxMenuItem); formatJMenu.add(fontJMenuItem); formatJMenu.add(colorJMenuItem); viewJMenu.add(statusBarJCheckBoxMenuItem); helpJMenu.add(helpJMenuItem); helpJMenu.add(aboutJMenuItem); menuBar.add(fileJMenu); menuBar.add(editJMenu); menuBar.add(formatJMenu); menuBar.add(viewJMenu); menuBar.add(helpJMenu); southJPanel.setVisible(false); southJPanel.add(statusJLabel); //JScrollPane setup JScrollPane scrollPane = new JScrollPane(textArea); scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); //setting uo the Jframe this.setJMenuBar(menuBar); this.add(scrollPane, BorderLayout.CENTER); this.add(southJPanel, BorderLayout.SOUTH); textArea.addMouseListener(new MouseInputListener() { @Override public void mouseClicked(MouseEvent e) { Highlighter h = textArea.getHighlighter(); h.removeAllHighlights(); } @Override public void mousePressed(MouseEvent e) { Highlighter h = textArea.getHighlighter(); h.removeAllHighlights(); } @Override public void mouseReleased(MouseEvent e) { } @Override public void mouseEntered(MouseEvent e) { } @Override public void mouseExited(MouseEvent e) { } @Override public void mouseDragged(MouseEvent e) { } @Override public void mouseMoved(MouseEvent e) { } }); textArea.addKeyListener(new IgboKeyListener(textArea)); }
From source file:Clavis.Windows.WShedule.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor./*from ww w. j a v a2 s. com*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanelInicial = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); jTable1 = new org.jdesktop.swingx.JXTable(); ; jButtonSair = new javax.swing.JButton(); jXDatePickerInicio = new org.jdesktop.swingx.JXDatePicker(); jXDatePickerFim = new org.jdesktop.swingx.JXDatePicker(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jButtonImprimir = new javax.swing.JButton(); jComboBoxEstado = new javax.swing.JComboBox<>(); jLabel3 = new javax.swing.JLabel(); jButtonExportar = new javax.swing.JButton(); setMinimumSize(new java.awt.Dimension(900, 600)); setSize(new java.awt.Dimension(900, 600)); jPanelInicial.setBorder(javax.swing.BorderFactory.createCompoundBorder( javax.swing.BorderFactory.createLineBorder(painelcor, 4), javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)))); jPanelInicial.setMinimumSize(new java.awt.Dimension(900, 500)); jPanelInicial.setPreferredSize(new java.awt.Dimension(900, 500)); org.jdesktop.swingx.border.DropShadowBorder dropShadowBorder1 = new org.jdesktop.swingx.border.DropShadowBorder(); dropShadowBorder1.setCornerSize(6); dropShadowBorder1.setShadowSize(3); dropShadowBorder1.setShowLeftShadow(true); jScrollPane1.setBorder(javax.swing.BorderFactory.createCompoundBorder(dropShadowBorder1, javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)))); jTable1.setBorder(null); if (mat.getTypeOfMaterial().getMaterialTypeID() == 1) { jTable1.setModel(new javax.swing.table.DefaultTableModel(new Object[][] {}, new String[] { lingua.translate("Utilizador"), lingua.translate("Horrio"), lingua.translate("Data"), lingua.translate("Atividade"), lingua.translate("Disciplina") })); jTable1.getColumnModel().getColumn(0).setPreferredWidth(250); jTable1.getColumnModel().getColumn(1).setMinWidth(90); jTable1.getColumnModel().getColumn(2).setMinWidth(90); jTable1.getColumnModel().getColumn(3).setMinWidth(150); jTable1.getColumnModel().getColumn(4).setMinWidth(150); } else { jTable1.setModel(new javax.swing.table.DefaultTableModel(new Object[][] {}, new String[] { lingua.translate("Utilizador"), lingua.translate("Data inicial"), lingua.translate("Data final"), lingua.translate("Atividade") })); jTable1.getColumnModel().getColumn(0).setPreferredWidth(250); jTable1.getColumnModel().getColumn(1).setMinWidth(90); jTable1.getColumnModel().getColumn(2).setMinWidth(90); jTable1.getColumnModel().getColumn(3).setMinWidth(150); } jScrollPane1.setViewportView(jTable1); Border border = BorderFactory.createEmptyBorder(5, 5, 0, 0); UIManager.put("Table.focusCellHighlightBorder", border); jTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); DefaultTableCellRenderer renderer = new DefaultTableCellRenderer(); renderer.setHorizontalAlignment(javax.swing.JLabel.CENTER); renderer.setFocusable(false); javax.swing.JLabel lo = new javax.swing.JLabel(); lo.setBackground(new Color(100, 100, 100)); lo.setOpaque(true); jScrollPane1.setCorner(javax.swing.JScrollPane.UPPER_TRAILING_CORNER, lo); jTable1.setRowHeight(30); jTable1.setEditable(false); jTable1.setSelectionBackground(Color.DARK_GRAY); jTable1.getColumnModel().getColumn(1).setCellRenderer(renderer); jTable1.getColumnModel().getColumn(2).setCellRenderer(renderer); jTable1.getColumnModel().getColumn(3).setCellRenderer(renderer); if (mat.getTypeOfMaterial().getMaterialTypeID() == 1) { jTable1.getColumnModel().getColumn(4).setCellRenderer(renderer); } DefaultTableCellRenderer headerRenderer = new DefaultTableCellRenderer() { private static final long serialVersionUID = 2L; @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); setFont(new Font("Cantarell", Font.PLAIN, 14)); this.setBorder(BorderFactory.createMatteBorder(0, 1, 1, 0, new Color(1, 1, 1))); return this; } }; DefaultTableCellRenderer headerRenderer2 = new DefaultTableCellRenderer() { private static final long serialVersionUID = 3L; @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); setFont(new Font("Cantarell", Font.PLAIN, 14)); this.setBorder(BorderFactory.createCompoundBorder( BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(1, 1, 1)), BorderFactory.createEmptyBorder(0, 20, 0, 0))); this.setBackground(new Color(100, 100, 100)); setForeground(Color.WHITE); setPreferredSize(new Dimension(100, 40)); return this; } }; headerRenderer.setBackground(new Color(100, 100, 100)); headerRenderer.setForeground(Color.WHITE); headerRenderer.setPreferredSize(new Dimension(100, 40)); headerRenderer.setHorizontalAlignment(javax.swing.JLabel.CENTER); for (int i = 0; i < jTable1.getColumnCount(); i++) { if (i == 0) { headerRenderer2.setHorizontalAlignment(javax.swing.JLabel.LEFT); jTable1.getColumnModel().getColumn(i).setHeaderRenderer(headerRenderer2); } else { jTable1.getColumnModel().getColumn(i).setHeaderRenderer(headerRenderer); } } jButtonSair.setBackground(new java.awt.Color(1, 1, 1)); jButtonSair.setToolTipText(""); jButtonSair.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); jButtonSair.setFocusPainted(false); jButtonSair.setMaximumSize(new java.awt.Dimension(90, 40)); jButtonSair.setMinimumSize(new java.awt.Dimension(90, 40)); jButtonSair.setPreferredSize(new java.awt.Dimension(90, 40)); jButtonSair.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonSairActionPerformed(evt); } }); jXDatePickerInicio.setBackground(new java.awt.Color(254, 254, 254)); org.jdesktop.swingx.border.DropShadowBorder dropShadowBorder2 = new org.jdesktop.swingx.border.DropShadowBorder(); dropShadowBorder2.setCornerSize(6); dropShadowBorder2.setShadowSize(3); dropShadowBorder2.setShowLeftShadow(true); jXDatePickerInicio.setBorder(javax.swing.BorderFactory.createCompoundBorder(dropShadowBorder2, javax.swing.BorderFactory.createMatteBorder(0, 1, 1, 1, new java.awt.Color(0, 0, 0)))); jXDatePickerInicio.setFont(new java.awt.Font("Cantarell", 0, 12)); // NOI18N jXDatePickerInicio.setMaximumSize(new java.awt.Dimension(1155551, 26)); jXDatePickerInicio.setMinimumSize(new java.awt.Dimension(66, 26)); jXDatePickerInicio.setPreferredSize(new java.awt.Dimension(131, 26)); jXDatePickerInicio.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jXDatePickerInicioActionPerformed(evt); } }); jXDatePickerFim.setBackground(new java.awt.Color(254, 254, 254)); org.jdesktop.swingx.border.DropShadowBorder dropShadowBorder3 = new org.jdesktop.swingx.border.DropShadowBorder(); dropShadowBorder3.setCornerSize(6); dropShadowBorder3.setShadowSize(3); dropShadowBorder3.setShowLeftShadow(true); jXDatePickerFim.setBorder(javax.swing.BorderFactory.createCompoundBorder(dropShadowBorder3, javax.swing.BorderFactory.createMatteBorder(0, 1, 1, 1, new java.awt.Color(0, 0, 0)))); jXDatePickerFim.setFont(new java.awt.Font("Cantarell", 0, 12)); // NOI18N jXDatePickerFim.setMaximumSize(new java.awt.Dimension(1155551, 26)); jXDatePickerFim.setMinimumSize(new java.awt.Dimension(66, 26)); jXDatePickerFim.setPreferredSize(new java.awt.Dimension(121, 26)); jLabel1.setBackground(new java.awt.Color(100, 100, 100)); jLabel1.setFont(new java.awt.Font("Cantarell", 0, 12)); // NOI18N jLabel1.setForeground(new java.awt.Color(254, 254, 254)); jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("Incio"); jLabel1.setVerticalAlignment(javax.swing.SwingConstants.TOP); jLabel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabel1.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); jLabel1.setMaximumSize(new java.awt.Dimension(3343446, 96)); jLabel1.setMinimumSize(new java.awt.Dimension(36, 26)); jLabel1.setOpaque(true); jLabel1.setPreferredSize(new java.awt.Dimension(100, 20)); jLabel2.setBackground(new java.awt.Color(100, 100, 100)); jLabel2.setFont(new java.awt.Font("Cantarell", 0, 12)); // NOI18N jLabel2.setForeground(new java.awt.Color(254, 254, 254)); jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel2.setText("Fim"); jLabel2.setVerticalAlignment(javax.swing.SwingConstants.TOP); jLabel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabel2.setMaximumSize(new java.awt.Dimension(355557, 96)); jLabel2.setMinimumSize(new java.awt.Dimension(37, 26)); jLabel2.setOpaque(true); jLabel2.setPreferredSize(new java.awt.Dimension(100, 20)); jButtonImprimir.setBackground(new java.awt.Color(51, 102, 153)); jButtonImprimir.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); jButtonImprimir.setFocusPainted(false); jButtonImprimir.setMaximumSize(new java.awt.Dimension(5345, 40)); jButtonImprimir.setPreferredSize(new java.awt.Dimension(90, 40)); jButtonImprimir.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonImprimirActionPerformed(evt); } }); jComboBoxEstado.setBackground(new java.awt.Color(213, 213, 213)); jComboBoxEstado.setBorder(null); jComboBoxEstado.setFocusable(false); jComboBoxEstado.setMinimumSize(new java.awt.Dimension(35, 22)); jComboBoxEstado.setPreferredSize(new java.awt.Dimension(125, 28)); jComboBoxEstado.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jComboBoxEstadoActionPerformed(evt); } }); jLabel3.setBackground(new java.awt.Color(100, 100, 100)); jLabel3.setFont(new java.awt.Font("Cantarell", 0, 12)); // NOI18N jLabel3.setForeground(new java.awt.Color(254, 254, 254)); jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel3.setText("Estado"); jLabel3.setVerticalAlignment(javax.swing.SwingConstants.TOP); jLabel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jLabel3.setMaximumSize(new java.awt.Dimension(355557, 96)); jLabel3.setMinimumSize(new java.awt.Dimension(37, 26)); jLabel3.setOpaque(true); jLabel3.setPreferredSize(new java.awt.Dimension(100, 20)); jButtonExportar.setBackground(new java.awt.Color(51, 102, 153)); jButtonExportar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); jButtonExportar.setFocusPainted(false); jButtonExportar.setMaximumSize(new java.awt.Dimension(5345, 40)); jButtonExportar.setPreferredSize(new java.awt.Dimension(90, 40)); jButtonExportar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonExportarActionPerformed(evt); } }); javax.swing.GroupLayout jPanelInicialLayout = new javax.swing.GroupLayout(jPanelInicial); jPanelInicial.setLayout(jPanelInicialLayout); jPanelInicialLayout.setHorizontalGroup(jPanelInicialLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelInicialLayout.createSequentialGroup().addGap(42, 42, 42) .addGroup(jPanelInicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelInicialLayout.createSequentialGroup().addComponent(jScrollPane1) .addGap(42, 42, 42)) .addGroup(jPanelInicialLayout.createSequentialGroup().addGap(29, 29, 29) .addComponent(jButtonSair, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonExportar, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonImprimir, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(71, 71, 71)))) .addGroup(jPanelInicialLayout.createSequentialGroup().addGap(71, 71, 71) .addGroup(jPanelInicialLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jXDatePickerInicio, javax.swing.GroupLayout.DEFAULT_SIZE, 152, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanelInicialLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 152, Short.MAX_VALUE) .addComponent(jXDatePickerFim, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 201, Short.MAX_VALUE) .addGroup(jPanelInicialLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jComboBoxEstado, 0, 241, Short.MAX_VALUE)) .addGap(71, 71, 71))); jPanelInicialLayout .setVerticalGroup(jPanelInicialLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelInicialLayout.createSequentialGroup().addGap(16, 16, 16) .addGroup(jPanelInicialLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(0, 0, 0) .addGroup(jPanelInicialLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jXDatePickerInicio, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jXDatePickerFim, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jComboBoxEstado, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 465, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanelInicialLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jButtonImprimir, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButtonSair, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButtonExportar, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(16, 16, 16))); try { if (Clavis.KeyQuest.class.getResource("Images/exit26x24.png") != null) { BufferedImage im = ImageIO.read(Clavis.KeyQuest.class.getResourceAsStream("Images/exit26x24.png")); ImageIcon imic = new ImageIcon(im); if (imic != null) { jButtonSair.setIcon(imic); } } } catch (IOException eo) { } jButtonSair.setToolTipText(lingua.translate("Voltar")); javax.swing.JPanel pan2 = new javax.swing.JPanel(null); String compoe = lingua.translate("Hoje dia") + ": " + new TimeDate.Date().toString(); javax.swing.JLabel fil2 = new javax.swing.JLabel(compoe); fil2.setBounds(0, 0, 300, 26); fil2.setHorizontalAlignment(SwingConstants.CENTER); pan2.setPreferredSize(new Dimension(300, 30)); pan2.setBounds(0, 0, 300, 30); pan2.add(fil2); jXDatePickerInicio.setLinkPanel(pan2); jXDatePickerInicio.setLocale(lingua.systemlocale); jXDatePickerInicio.getEditor().setSelectionColor(Color.DARK_GRAY); jXDatePickerInicio.getEditor().setBorder(BorderFactory.createEmptyBorder()); jXDatePickerInicio.getEditor().setHorizontalAlignment(SwingConstants.CENTER); javax.swing.JButton bbt2 = (javax.swing.JButton) jXDatePickerInicio.getComponent(1); bbt2.setBackground(Color.WHITE); jXDatePickerInicio.addActionListener(actionJXDatePicker()); jXDatePickerInicio.setFormats("dd/MM/yyyy"); javax.swing.JPanel pan = new javax.swing.JPanel(null); String compoe0 = lingua.translate("Hoje dia") + ": " + new TimeDate.Date().toString(); javax.swing.JLabel fil = new javax.swing.JLabel(compoe); fil.setBounds(0, 0, 300, 26); fil.setHorizontalAlignment(SwingConstants.CENTER); pan.setPreferredSize(new Dimension(300, 30)); pan.setBounds(0, 0, 300, 30); pan.add(fil); jXDatePickerFim.setLinkPanel(pan); Component[] t = jXDatePickerFim.getLinkPanel().getComponents(); jXDatePickerFim.setLocale(lingua.systemlocale); jXDatePickerFim.getEditor().setSelectionColor(Color.DARK_GRAY); jXDatePickerFim.getEditor().setBorder(BorderFactory.createEmptyBorder()); jXDatePickerFim.getEditor().setHorizontalAlignment(SwingConstants.CENTER); javax.swing.JButton bbt = (javax.swing.JButton) jXDatePickerFim.getComponent(1); bbt.setBackground(Color.WHITE); jXDatePickerFim.addActionListener(actionJXDatePicker()); jXDatePickerFim.setFormats("dd/MM/yyyy"); jLabel1.setText(lingua.translate("Incio")); jLabel2.setText(lingua.translate("Fim")); try { if (Clavis.KeyQuest.class.getResource("Images/print.png") != null) { BufferedImage im = ImageIO.read(Clavis.KeyQuest.class.getResourceAsStream("Images/print.png")); ImageIcon imic = new ImageIcon(im); if (imic != null) { jButtonImprimir.setIcon(imic); } } } catch (IOException eo) { } jButtonImprimir.setToolTipText(lingua.translate("Imprimir")); jComboBoxEstado.setModel(new javax.swing.DefaultComboBoxModel<>( new String[] { lingua.translate("todos"), lingua.translate("terminado"), lingua.translate("no realizado"), lingua.translate("por realizar") })); Clavis.KeyQuest.addVisualComboBox(jComboBoxEstado); ((javax.swing.JLabel) jComboBoxEstado.getRenderer()).setHorizontalAlignment(javax.swing.JLabel.CENTER); jLabel3.setText(lingua.translate("Estado")); try { if (Clavis.KeyQuest.class.getResource("Images/exportar.png") != null) { BufferedImage im = ImageIO.read(Clavis.KeyQuest.class.getResourceAsStream("Images/exportar.png")); ImageIcon imic = new ImageIcon(im); if (imic != null) { jButtonExportar.setIcon(imic); } } } catch (IOException eo) { } jButtonExportar.setToolTipText(lingua.translate("Exportar para excel")); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addComponent(jPanelInicial, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(0, 0, 0))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanelInicial, javax.swing.GroupLayout.DEFAULT_SIZE, 600, Short.MAX_VALUE)); }
From source file:forge.gui.CardDetailPanel.java
private void updateBorder(final CardStateView card, final boolean canShow) { // color info if (card == null) { setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2)); scrArea.setBorder(BorderFactory.createEmptyBorder(2, 0, 0, 0)); return;//from w w w. j a v a 2s. c o m } final Color color = fromDetailColor(CardDetailUtil.getBorderColor(card, canShow)); setBorder(BorderFactory.createLineBorder(color, 2)); scrArea.setBorder(BorderFactory.createMatteBorder(2, 0, 0, 0, color)); }
From source file:eu.europa.ec.markt.dss.applet.util.ComponentFactory.java
/** * //from w ww. j av a 2 s . c o m * @param currentStep * @param maxStep * @return */ public static JPanel createWizardStepPanel(final int currentStep, final int maxStep) { final List<String> colSpecs = new ArrayList<String>(); for (int i = 1; i <= maxStep; i++) { colSpecs.add("default:grow"); } final FormLayout layout = new FormLayout(DSSUtils.join(colSpecs, ","), "pref"); final PanelBuilder builder = ComponentFactory.createBuilder(layout); final CellConstraints cc = new CellConstraints(); for (int i = 1; i <= maxStep; i++) { final JPanel subPanel = ComponentFactory .createPanel(i == currentStep ? DEFAULT_HIGHLIGHT : DEFAULT_BACKGROUND); subPanel.add(ComponentFactory.createLabel(String.valueOf(i))); final Border border = (i != maxStep) ? BorderFactory.createMatteBorder(0, 1, 0, 0, Color.GRAY) : BorderFactory.createMatteBorder(0, 1, 0, 1, Color.GRAY); subPanel.setBorder(border); builder.add(subPanel, cc.xy(i, 1)); } final JPanel panel = ComponentFactory.createPanel(builder); panel.setBorder(BorderFactory.createMatteBorder(1, 0, 1, 0, Color.GRAY)); return panel; }
From source file:com.mirth.connect.client.ui.panels.connectors.SourceSettingsPanel.java
private void initComponents() { setBackground(UIConstants.BACKGROUND_COLOR); setBorder(BorderFactory.createTitledBorder( BorderFactory.createMatteBorder(1, 0, 0, 0, new Color(204, 204, 204)), "Source Settings", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Tahoma", 1, 11))); sourceQueueLabel = new JLabel("Source Queue:"); sourceQueueComboBox = new MirthComboBox(); sourceQueueComboBox.setModel(new DefaultComboBoxModel( new String[] { "OFF (Respond after processing)", "ON (Respond before processing)" })); sourceQueueComboBox.setToolTipText(/* w w w . ja va 2 s . c o m*/ "<html>Selecting OFF will process the message before sending the response (can use response from destinations)<br>Selecting ON will queue messages and immediately send a response (cannot use response from destinations)</html>"); sourceQueueComboBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { sourceQueueComboBoxActionPerformed(evt); } }); queueWarningLabel = new JLabel("Queuing is not supported by the current message storage mode."); queueWarningLabel.setForeground(Color.RED); queueBufferSizeLabel = new JLabel("Queue Buffer Size:"); queueBufferSizeField = new JTextField(); queueBufferSizeField.setDocument(new MirthFieldConstraints(0, false, false, true)); queueBufferSizeField.setToolTipText( "<html>The buffer size for the source queue.<br/>Up to this many connector messages may<br/>be held in memory at once when queuing.</html>"); responseLabel = new JLabel("Response:"); responseComboBox = new MirthComboBox(); responseComboBox .setModel(new DefaultComboBoxModel(new String[] { "Auto-generate (After source transformer)", "None", "Auto-generate (Before processing)", "Auto-generate (After source transformer)", "Auto-generate (Destinations completed)", "Post-processor", "Destination 1" })); responseComboBox.setToolTipText( "<html>Select a destination's response, the postprocessor return value, or a response map variable.<br/>Select <b>\"Auto-generate\"</b> to send a response generated by the inbound data type using the raw message:<br/> - <b>Before processing:</b> Response generated before the channel processes the message (SENT status)<br/> - <b>After source transformer:</b> Response generated after the channel processes the message (source status)<br/> - <b>Destinations completed:</b> Response generated after the channel processes the message, with a status<br/> based on the destination statuses, using a precedence of ERROR, QUEUED, SENT, FILTERED<br/></html>"); processBatchLabel = new JLabel("Process Batch:"); ButtonGroup processBatchButtonGroup = new ButtonGroup(); processBatchYesRadio = new MirthRadioButton("Yes"); processBatchYesRadio.setBackground(getBackground()); processBatchYesRadio.setToolTipText( "<html>Select Yes to enable batch processing. Batch messages are only supported if<br>the source connector's inbound properties contains a <b>Batch</b> section.</html>"); processBatchYesRadio.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { processBatchYesRadioActionPerformed(evt); } }); processBatchButtonGroup.add(processBatchYesRadio); processBatchNoRadio = new MirthRadioButton("No"); processBatchNoRadio.setBackground(getBackground()); processBatchNoRadio.setToolTipText( "<html>Select Yes to enable batch processing. Batch messages are only supported if<br>the source connector's inbound properties contains a <b>Batch</b> section.</html>"); processBatchNoRadio.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { processBatchNoRadioActionPerformed(evt); } }); processBatchButtonGroup.add(processBatchNoRadio); batchResponseLabel = new JLabel("Batch Response:"); ButtonGroup batchResponseButtonGroup = new ButtonGroup(); batchResponseFirstRadio = new MirthRadioButton("First"); batchResponseFirstRadio.setBackground(getBackground()); batchResponseFirstRadio.setToolTipText( "<html>Each message in the batch contains its own response that is generated via the method selected above.<br> Select either the response from the first or last message in the batch to be sent back to the originating system.</html>"); batchResponseButtonGroup.add(batchResponseFirstRadio); batchResponseLastRadio = new MirthRadioButton("Last"); batchResponseLastRadio.setBackground(getBackground()); batchResponseLastRadio.setToolTipText( "<html>Each message in the batch contains its own response that is generated via the method selected above.<br> Select either the response from the first or last message in the batch to be sent back to the originating system.</html>"); batchResponseButtonGroup.add(batchResponseLastRadio); processingThreadsLabel = new JLabel("Max Processing Threads:"); processingThreadsField = new MirthTextField(); processingThreadsField.setDocument(new MirthFieldConstraints(0, false, false, true)); processingThreadsField.setToolTipText( "<html>The maximum number of messages that can process through<br/>the channel simultaneously. Note that when this value<br/>is greater than 1, message order is NOT guaranteed.</html>"); }
From source file:com.mirth.connect.client.ui.SettingsPanelAdministrator.java
private void initComponents() { setBackground(UIConstants.BACKGROUND_COLOR); systemSettingsPanel = new JPanel(); systemSettingsPanel.setBackground(getBackground()); systemSettingsPanel.setBorder(BorderFactory.createTitledBorder( BorderFactory.createMatteBorder(1, 0, 0, 0, new Color(204, 204, 204)), "System Preferences", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Tahoma", 1, 11))); dashboardRefreshIntervalLabel = new JLabel("Dashboard refresh interval (seconds):"); dashboardRefreshIntervalField = new MirthTextField(); dashboardRefreshIntervalField.setToolTipText( "<html>Interval in seconds at which to refresh the Dashboard. Decrement this for <br>faster updates, and increment it for slower servers with more channels.</html>"); String toolTipText = "Sets the default page size for browsers (message, event, etc.)"; messageBrowserPageSizeLabel = new JLabel("Message browser page size:"); messageBrowserPageSizeField = new MirthTextField(); messageBrowserPageSizeField.setToolTipText(toolTipText); eventBrowserPageSizeLabel = new JLabel("Event browser page size:"); eventBrowserPageSizeField = new MirthTextField(); eventBrowserPageSizeField.setToolTipText(toolTipText); formatLabel = new JLabel("Format text in message browser:"); formatButtonGroup = new ButtonGroup(); toolTipText = "Pretty print messages in the message browser."; formatYesRadio = new MirthRadioButton("Yes"); formatYesRadio.setBackground(systemSettingsPanel.getBackground()); formatYesRadio.setToolTipText(toolTipText); formatButtonGroup.add(formatYesRadio); formatNoRadio = new MirthRadioButton("No"); formatNoRadio.setBackground(systemSettingsPanel.getBackground()); formatNoRadio.setToolTipText(toolTipText); formatButtonGroup.add(formatNoRadio); textSearchWarningLabel = new JLabel("Message browser text search confirmation:"); textSearchWarningButtonGroup = new ButtonGroup(); toolTipText = "<html>Show a confirmation dialog in the message browser when attempting a text search, warning users<br/>that the query may take a long time depending on the amount of messages being searched.</html>"; textSearchWarningYesRadio = new MirthRadioButton("Yes"); textSearchWarningYesRadio.setBackground(systemSettingsPanel.getBackground()); textSearchWarningYesRadio.setToolTipText(toolTipText); textSearchWarningButtonGroup.add(textSearchWarningYesRadio); textSearchWarningNoRadio = new MirthRadioButton("No"); textSearchWarningNoRadio.setBackground(systemSettingsPanel.getBackground()); textSearchWarningNoRadio.setToolTipText(toolTipText); textSearchWarningButtonGroup.add(textSearchWarningNoRadio); importChannelLibrariesLabel = new JLabel("Import code template libraries with channels:"); importChannelLibrariesButtonGroup = new ButtonGroup(); toolTipText = "<html>When attempting to import channels that have code template<br/>libraries linked to them, select Yes to always include them,<br/>No to never include them, or Ask to prompt the user each time.</html>"; importChannelLibrariesYesRadio = new MirthRadioButton("Yes"); importChannelLibrariesYesRadio.setBackground(systemSettingsPanel.getBackground()); importChannelLibrariesYesRadio.setToolTipText(toolTipText); importChannelLibrariesButtonGroup.add(importChannelLibrariesYesRadio); importChannelLibrariesNoRadio = new MirthRadioButton("No"); importChannelLibrariesNoRadio.setBackground(systemSettingsPanel.getBackground()); importChannelLibrariesNoRadio.setToolTipText(toolTipText); importChannelLibrariesButtonGroup.add(importChannelLibrariesNoRadio); importChannelLibrariesAskRadio = new MirthRadioButton("Ask"); importChannelLibrariesAskRadio.setBackground(systemSettingsPanel.getBackground()); importChannelLibrariesAskRadio.setToolTipText(toolTipText); importChannelLibrariesButtonGroup.add(importChannelLibrariesAskRadio); exportChannelLibrariesLabel = new JLabel("Export code template libraries with channels:"); exportChannelLibrariesButtonGroup = new ButtonGroup(); toolTipText = "<html>When attempting to export channels that have code template<br/>libraries linked to them, select Yes to always include them,<br/>No to never include them, or Ask to prompt the user each time.</html>"; exportChannelLibrariesYesRadio = new MirthRadioButton("Yes"); exportChannelLibrariesYesRadio.setBackground(systemSettingsPanel.getBackground()); exportChannelLibrariesYesRadio.setToolTipText(toolTipText); exportChannelLibrariesButtonGroup.add(exportChannelLibrariesYesRadio); exportChannelLibrariesNoRadio = new MirthRadioButton("No"); exportChannelLibrariesNoRadio.setBackground(systemSettingsPanel.getBackground()); exportChannelLibrariesNoRadio.setToolTipText(toolTipText); exportChannelLibrariesButtonGroup.add(exportChannelLibrariesNoRadio); exportChannelLibrariesAskRadio = new MirthRadioButton("Ask"); exportChannelLibrariesAskRadio.setBackground(systemSettingsPanel.getBackground()); exportChannelLibrariesAskRadio.setToolTipText(toolTipText); exportChannelLibrariesButtonGroup.add(exportChannelLibrariesAskRadio); userSettingsPanel = new JPanel(); userSettingsPanel.setBackground(getBackground()); userSettingsPanel.setBorder(BorderFactory.createTitledBorder( BorderFactory.createMatteBorder(1, 0, 0, 0, new Color(204, 204, 204)), "User Preferences", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Tahoma", 1, 11))); checkForNotificationsLabel = new JLabel("Check for new notifications on login:"); notificationButtonGroup = new ButtonGroup(); checkForNotificationsYesRadio = new MirthRadioButton("Yes"); checkForNotificationsYesRadio.setBackground(userSettingsPanel.getBackground()); checkForNotificationsYesRadio.setToolTipText( "<html>Checks for notifications from Mirth (announcements, available updates, etc.)<br/>relevant to this version of Mirth Connect whenever user logs in.</html>"); notificationButtonGroup.add(checkForNotificationsYesRadio); checkForNotificationsNoRadio = new MirthRadioButton("No"); checkForNotificationsNoRadio.setBackground(userSettingsPanel.getBackground()); checkForNotificationsNoRadio.setToolTipText( "<html>Checks for notifications from Mirth (announcements, available updates, etc.)<br/>relevant to this version of Mirth Connect whenever user logs in.</html>"); notificationButtonGroup.add(checkForNotificationsNoRadio); codeEditorSettingsPanel = new JPanel(); codeEditorSettingsPanel.setBackground(getBackground()); codeEditorSettingsPanel.setBorder(BorderFactory.createTitledBorder( BorderFactory.createMatteBorder(1, 0, 0, 0, new Color(204, 204, 204)), "Code Editor Preferences", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, new Font("Tahoma", 1, 11))); toolTipText = "<html>The auto-completion popup will be triggered<br/>after any of these characters are typed.</html>"; autoCompleteCharactersLabel = new JLabel("Auto-Complete Characters:"); autoCompleteCharactersField = new MirthTextField(); autoCompleteCharactersField.setToolTipText(toolTipText); autoCompleteCharactersField.getDocument().addDocumentListener(new DocumentListener() { @Override/*from w w w.j a va2 s . c om*/ public void insertUpdate(DocumentEvent evt) { autoCompleteActionPerformed(); } @Override public void removeUpdate(DocumentEvent evt) { autoCompleteActionPerformed(); } @Override public void changedUpdate(DocumentEvent evt) { autoCompleteActionPerformed(); } }); toolTipText = "<html>If selected, auto-completion will be<br/>triggered after any letter is typed.</html>"; autoCompleteIncludeLettersCheckBox = new MirthCheckBox("Include Letters"); autoCompleteIncludeLettersCheckBox.setBackground(codeEditorSettingsPanel.getBackground()); autoCompleteIncludeLettersCheckBox.setToolTipText(toolTipText); autoCompleteIncludeLettersCheckBox.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent evt) { autoCompleteActionPerformed(); } }); toolTipText = "<html>The amount of time to wait after typing<br/>an activation character before opening<br/>the auto-completion popup menu.</html>"; autoCompleteDelayLabel = new JLabel("Activation Delay (ms):"); autoCompleteDelayField = new MirthTextField(); autoCompleteDelayField.setToolTipText(toolTipText); autoCompleteDelayField.setDocument(new MirthFieldConstraints(9, false, false, true)); shortcutKeyLabel = new JLabel("Shortcut Key Mappings:"); shortcutKeyTable = new MirthTable(); shortcutKeyTable.setModel(new RefreshTableModel( new Object[] { "Action Info", "Name", "Description", "Shortcut Key Mapping" }, 0) { @Override public boolean isCellEditable(int row, int column) { return column == KEY_COLUMN; } }); shortcutKeyTable.setDragEnabled(false); shortcutKeyTable.setRowSelectionAllowed(false); shortcutKeyTable.setRowHeight(UIConstants.ROW_HEIGHT); shortcutKeyTable.setFocusable(false); shortcutKeyTable.setOpaque(true); shortcutKeyTable.setSortable(true); if (Preferences.userNodeForPackage(Mirth.class).getBoolean("highlightRows", true)) { shortcutKeyTable.setHighlighters(HighlighterFactory .createAlternateStriping(UIConstants.HIGHLIGHTER_COLOR, UIConstants.BACKGROUND_COLOR)); } shortcutKeyTable.getColumnModel().getColumn(NAME_COLUMN).setMinWidth(145); shortcutKeyTable.getColumnModel().getColumn(NAME_COLUMN).setPreferredWidth(145); shortcutKeyTable.getColumnModel().getColumn(DESCRIPTION_COLUMN).setPreferredWidth(600); shortcutKeyTable.getColumnModel().getColumn(KEY_COLUMN).setMinWidth(120); shortcutKeyTable.getColumnModel().getColumn(KEY_COLUMN).setPreferredWidth(150); shortcutKeyTable.getColumnModel().getColumn(KEY_COLUMN).setCellRenderer(new KeyStrokeCellRenderer()); shortcutKeyTable.getColumnModel().getColumn(KEY_COLUMN).setCellEditor(new KeyStrokeCellEditor()); shortcutKeyTable.removeColumn(shortcutKeyTable.getColumnModel().getColumn(ACTION_INFO_COLUMN)); shortcutKeyTable.getModel().addTableModelListener(new TableModelListener() { @Override public void tableChanged(TableModelEvent evt) { updateRestoreDefaultsButton(); } }); shortcutKeyScrollPane = new JScrollPane(shortcutKeyTable); restoreDefaultsButton = new JButton("Restore Defaults"); restoreDefaultsButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent evt) { restoreDefaults(); } }); }