List of usage examples for javax.swing SwingConstants BOTTOM
int BOTTOM
To view the source code for javax.swing SwingConstants BOTTOM.
Click Source Link
From source file:com.smart.aqimonitor.client.AqiMonitor.java
/** * Create the frame.// w w w . j a v a 2 s . com */ public AqiMonitor() { refSelf = this; setPreferredSize(new Dimension(640, 480)); setTitle("\u7A7A\u6C14\u8D28\u91CF\u76D1\u6D4B"); setIconImage(Toolkit.getDefaultToolkit() .getImage(AqiMonitor.class.getResource("/lombok/installer/eclipse/STS.png"))); setMinimumSize(new Dimension(640, 480)); setMaximumSize(new Dimension(1024, 768)); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 636, 412); contentPane = new JPanel(); contentPane.setPreferredSize(new Dimension(640, 480)); contentPane.setMinimumSize(new Dimension(640, 480)); contentPane.setMaximumSize(new Dimension(1024, 768)); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); contentPane.setLayout(new BorderLayout(0, 0)); setContentPane(contentPane); JPanel mainPanel = new JPanel(); contentPane.add(mainPanel, BorderLayout.CENTER); mainPanel.setLayout(new BorderLayout(0, 0)); JPanel contentPanel = new JPanel(); mainPanel.add(contentPanel, BorderLayout.CENTER); contentPanel.setLayout(new BorderLayout(0, 0)); JScrollPane scrollPane = new JScrollPane(); scrollPane .setViewportBorder(new TitledBorder(null, "", TitledBorder.LEADING, TitledBorder.TOP, null, null)); contentPanel.add(scrollPane, BorderLayout.CENTER); textPane = new AqiTextPane(); textPane.addInputMethodListener(new InputMethodListener() { public void caretPositionChanged(InputMethodEvent event) { } public void inputMethodTextChanged(InputMethodEvent event) { textPane.setCaretPosition(document.getLength() + 1); } }); textPane.setEditable(false); textPane.setOpaque(false); textPane.setForeground(Color.BLACK); scrollPane.setViewportView(textPane); document = textPane.getStyledDocument(); document.addDocumentListener(new DocumentListener() { @Override public void removeUpdate(DocumentEvent e) { changedUpdate(e); } @Override public void insertUpdate(DocumentEvent e) { changedUpdate(e); } @Override public void changedUpdate(DocumentEvent e) { if (e.getDocument() == document) { textPane.setCaretPosition(document.getLength()); } } }); JPanel buttonPanel = new JPanel(); contentPane.add(buttonPanel, BorderLayout.SOUTH); buttonPanel.setLayout(new BorderLayout(0, 0)); JLabel lblTipsLabel = new JLabel( "Tips\uFF1A\u6587\u4EF6\u4FDD\u5B58\u683C\u5F0Fcsv\u53EF\u7528Excel\u6253\u5F00"); lblTipsLabel.setForeground(Color.BLUE); buttonPanel.add(lblTipsLabel, BorderLayout.WEST); JPanel panel = new JPanel(); buttonPanel.add(panel, BorderLayout.CENTER); panel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5)); JButton btnRetrieve = new JButton("\u624B\u52A8\u83B7\u53D6\u6570\u636E"); panel.add(btnRetrieve); btnRetrieve.setVerticalAlignment(SwingConstants.BOTTOM); JButton btnNewButton = new JButton("\u5173\u4E8E"); btnNewButton.setToolTipText("\u5173\u4E8E"); btnNewButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { JTextArea textArea = new JTextArea( "\n csv\n\n smartstudio@foxmail.com"); textArea.setColumns(35); textArea.setRows(6); textArea.setLineWrap(true);// textArea.setEditable(false);// textArea.setOpaque(false); JOptionPane.showMessageDialog(contentPane, textArea, "", JOptionPane.PLAIN_MESSAGE); } }); JButton btnSetting = new JButton("\u8BBE\u7F6E"); btnSetting.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { Point parentPos = refSelf.getLocation(); AqiSettingDialog settingDialog = new AqiSettingDialog(refSelf, pm25InDetailJob.getAqiParser()); settingDialog.setModal(true); settingDialog.setLocation(parentPos.x + 100, parentPos.y + 150); settingDialog.init(); settingDialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); settingDialog.setVisible(true); } }); JButton btnExportDir = new JButton("\u67E5\u770B\u6570\u636E"); btnExportDir.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { String[] cmd = new String[5]; String filePath = pm25InDetailJob.getAqiParser().getFilePath(); File file = new File(filePath); if (!file.exists()) { FileUtil.makeDir(file); } if (!file.isDirectory()) { JOptionPane.showMessageDialog(contentPane, "", "", JOptionPane.ERROR_MESSAGE); return; } cmd[0] = "cmd"; cmd[1] = "/c"; cmd[2] = "start"; cmd[3] = " "; cmd[4] = pm25InDetailJob.getAqiParser().getFilePath(); Runtime.getRuntime().exec(cmd); } catch (IOException ex) { ex.printStackTrace(); } } }); panel.add(btnExportDir); panel.add(btnSetting); panel.add(btnNewButton); btnRetrieve.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (!isRetrieving) { isRetrieving = true; Thread firstRun = new Thread(new Runnable() { @Override public void run() { pm25InDetailJob.refresh(); isRetrieving = false; } }); firstRun.start(); } } }); init(); }
From source file:de.tbuchloh.kiskis.gui.SecuredElementView.java
private Component createTabs() { final JTabbedPane p = new PersistentTabPane(getClass().getName() + ".bottomFields", //$NON-NLS-1$ SwingConstants.BOTTOM); p.addTab(M.getString("NAME"), createMainTab()); //$NON-NLS-1$ p.addTab(M.getString("attachments.title"), //$NON-NLS-1$ _attachmentBox);/* www. j ava 2 s .c o m*/ p.addTab(M.getString("STATISTICS"), //$NON-NLS-1$ createStatisticTab()); p.addTab(M.getString("comment_border_title"), //$NON-NLS-1$ createCommentTab()); p.setBorder(BorderFactory.createEmptyBorder()); return createTitledPanel(M.getString("border_title"), p); //$NON-NLS-1$ }
From source file:edu.ku.brc.specify.ui.DBObjSearchPanel.java
/** * Constructs a search dialog from form infor and from search info. * @param viewSetName the viewset name//www . j a v a 2s .co m * @param viewName the form name from the viewset * @param searchName the search name, this is looked up by name in the "search_config.xml" file * @param className the name of the class to be created from the selected results * @param idFieldName the name of the field in the clas that is the primary key which is filled in from the search table id * @throws HeadlessException an exception */ public DBObjSearchPanel(final String viewSetName, final String viewName, final String searchName, final String className, final String idFieldName, final int searchBtnPos) throws HeadlessException { //this((Window)parent, viewSetName, viewName, searchName, className, idFieldName); super(new BorderLayout()); this.className = className; this.idFieldName = idFieldName; this.searchName = searchName; init(); String rowDef; if (searchBtnPos == SwingConstants.TOP) { rowDef = "t:p"; } else if (searchBtnPos == SwingConstants.BOTTOM) { rowDef = "b:p"; } else { rowDef = "p"; } PanelBuilder pb = new PanelBuilder(new FormLayout("f:p:g,1dlu,p", rowDef + ",2px,p,10px,p")); CellConstraints cc = new CellConstraints(); formView = AppContextMgr.getInstance().getView(viewSetName, viewName); if (formView != null) { form = ViewFactory.createFormView(null, formView, null, dataMap, MultiView.NO_OPTIONS, null); } else { log.error("Couldn't load form with name [" + viewSetName + "] Id [" + viewName + "]"); } if (form != null) { fieldIds = new ArrayList<String>(); form.getFieldIds(fieldIds); for (String id : fieldIds) { Component comp = form.getCompById(id); if (comp instanceof JTextField) { ((JTextField) comp).addActionListener(doQuery); } } form.getFieldNames(fieldNames); createSearchBtn(); pb.add(form.getUIComponent(), cc.xy(1, 1)); pb.add(searchBtn, cc.xy(3, 1)); if (!"collectionobjectsearch".equalsIgnoreCase(searchName)) { pb.add(UIHelper.createI18NLabel("DBObjSearchPanel.ASTERISK_HINT"), cc.xyw(1, 3, 3)); } pb.addSeparator(UIRegistry.getResourceString("DBObjSearchPanel.RESULTS"), cc.xyw(1, 5, 3)); add(pb.getPanel(), BorderLayout.NORTH); createUI(); } else { log.error("ViewSet [" + viewSetName + "] View[" + viewName + "] could not be created."); } }
From source file:net.sf.taverna.t2.activities.wsdlsir.views.WSDLActivityConfigurationView.java
private void initComponents() { this.setModalityType(Dialog.ModalityType.DOCUMENT_MODAL); int gridy = 0; // title panel JPanel titlePanel = new JPanel(new BorderLayout()); titlePanel.setBackground(Color.WHITE); JLabel titleLabel = new JLabel("Security configuration"); titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD, 13.5f)); titleLabel.setBorder(new EmptyBorder(10, 10, 0, 10)); DialogTextArea titleMessage = new DialogTextArea("Select a security profile for the service"); titleMessage.setMargin(new Insets(5, 20, 10, 10)); titleMessage.setFont(titleMessage.getFont().deriveFont(11f)); titleMessage.setEditable(false);/*from w w w . jav a 2 s. co m*/ titleMessage.setFocusable(false); titlePanel.setBorder(new EmptyBorder(10, 10, 0, 10)); titlePanel.add(titleLabel, BorderLayout.NORTH); titlePanel.add(titleMessage, BorderLayout.CENTER); addDivider(titlePanel, SwingConstants.BOTTOM, true); // Main panel JPanel mainPanel = new JPanel(); mainPanel.setLayout(new GridBagLayout()); mainPanel.setBorder(new EmptyBorder(10, 10, 10, 10)); //Create the radio buttons noSecurityRadioButton = new JRadioButton("None"); noSecurityRadioButton.addItemListener(this); wsSecurityAuthNRadioButton = new JRadioButton("WS-Security username and password authentication"); wsSecurityAuthNRadioButton.addItemListener(this); httpSecurityAuthNRadioButton = new JRadioButton("HTTP username and password authentication"); httpSecurityAuthNRadioButton.addItemListener(this); SAMLSecurityAuthNRadioButton = new JRadioButton("SAML WEB SSO profile authentication"); SAMLSecurityAuthNRadioButton.addItemListener(this); //Group the radio buttons buttonGroup = new ButtonGroup(); buttonGroup.add(noSecurityRadioButton); buttonGroup.add(wsSecurityAuthNRadioButton); buttonGroup.add(httpSecurityAuthNRadioButton); buttonGroup.add(SAMLSecurityAuthNRadioButton); GridBagConstraints gbc = new GridBagConstraints(); gbc.weightx = 1.0; gbc.weighty = 0.0; gbc.gridx = 0; gbc.gridy = gridy++; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 0, 0); mainPanel.add(noSecurityRadioButton, gbc); noSecurityLabel = new JLabel("Service requires no security"); noSecurityLabel.setFont(noSecurityLabel.getFont().deriveFont(11f)); // addDivider(noSecurityLabel, SwingConstants.BOTTOM, false); gbc.gridx = 0; gbc.gridy = gridy++; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(0, 40, 10, 10); mainPanel.add(noSecurityLabel, gbc); gbc.gridx = 0; gbc.gridy = gridy++; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 0, 0); mainPanel.add(httpSecurityAuthNRadioButton, gbc); ActionListener usernamePasswordListener = new ActionListener() { public void actionPerformed(ActionEvent e) { // Get Credential Manager UI to get the username and password for the service CredentialManagerUI credManagerUI = CredentialManagerUI.getInstance(); if (credManagerUI != null) credManagerUI.newPasswordForService(oldBean.getWsdl()); } }; httpSecurityAuthNLabel = new JLabel( "Service requires HTTP username and password in order to authenticate the user"); httpSecurityAuthNLabel.setFont(httpSecurityAuthNLabel.getFont().deriveFont(11f)); gbc.gridx = 0; gbc.gridy = gridy++; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(0, 40, 10, 10); mainPanel.add(httpSecurityAuthNLabel, gbc); // Set username and password button; setHttpUsernamePasswordButton = new JButton("Set username and password"); gbc.gridx = 0; gbc.gridy = gridy++; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.EAST; gbc.insets = new Insets(0, 40, 10, 10); gbc.weightx = 1.0; gbc.weighty = 1.0; // add any vertical space to this component mainPanel.add(setHttpUsernamePasswordButton, gbc); setHttpUsernamePasswordButton.addActionListener(usernamePasswordListener); /////SAML gbc.gridx = 0; gbc.gridy = gridy++; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 0, 0); mainPanel.add(SAMLSecurityAuthNRadioButton, gbc); ActionListener getCookieListener = new ActionListener() { /** * This listener will use the CallPreparator to obtain the cookies (included shibsession_XXX cookie) and * save it in the Credential Manager (as the password for user "nomatter") */ public void actionPerformed(ActionEvent e) { try { WSDLParser parser = new WSDLParser(newBean.getWsdl()); List<String> endpoints = parser.getOperationEndpointLocations(newBean.getOperation()); for (String endpoint : endpoints) //Actually i am only expecting one endpoint { if (debug) System.out .println("Obtaining a SAML cookies to save in credential manager:" + endpoint); Cookie[] cookies = CallPreparator.createCookieForCallToEndpoint(endpoint); // Uncomment for just the shibsession cookie // Cookie[] cookiessession = new Cookie[1]; // for (Cookie cook : cookies) // if (cook.getName().contains("shibsession")) // cookiessession[0]=cook; // cookies=cookiessession; CredentialManager credman = CredentialManager.getInstance(); credman.saveUsernameAndPasswordForService( new UsernamePassword("nomatter", serializetoString(cookies)), new URI(endpoint)); } } catch (WSDLException ex) { System.err.println( "Problem getting or saving SAML cookie: " + newBean.getWsdl() + ". " + ex.getMessage()); ex.printStackTrace(); } catch (ParserConfigurationException ex) { System.err.println( "Problem getting or saving SAML cookie: " + newBean.getWsdl() + ". " + ex.getMessage()); ex.printStackTrace(); } catch (Exception ex) { System.err.println( "Problem getting or saving SAML cookie: " + newBean.getWsdl() + ". " + ex.getMessage()); ex.printStackTrace(); } } }; SAMLSecurityAuthNLabel = new JLabel("<html>" + "Service requires SAML Web SSO profile to be perfomed in order to authenticate the user. " + "A cookie will be saved in your Credential Manger. " + "In the case that it stops working, please delete the entry in your Credential Manager or re-authenticate" + "</html>"); SAMLSecurityAuthNLabel.setFont(SAMLSecurityAuthNLabel.getFont().deriveFont(11f)); gbc.gridx = 0; gbc.gridy = gridy++; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(3, 40, 10, 10); mainPanel.add(SAMLSecurityAuthNLabel, gbc); // Set username and password button; setSAMLGETCookieButton = new JButton("Authenticate and save Authentication data in Credential Manger"); gbc.gridx = 0; gbc.gridy = gridy++; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.EAST; gbc.insets = new Insets(0, 40, 10, 10); gbc.weightx = 1.0; gbc.weighty = 1.0; // add any vertical space to this component mainPanel.add(setSAMLGETCookieButton, gbc); setSAMLGETCookieButton.addActionListener(getCookieListener); //END SAML gbc.gridx = 0; gbc.gridy = gridy++; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 10, 0, 0); mainPanel.add(wsSecurityAuthNRadioButton, gbc); wsSecurityAuthNLabel = new JLabel( "Service requires WS-Security username and password in order to authenticate the user"); wsSecurityAuthNLabel.setFont(wsSecurityAuthNLabel.getFont().deriveFont(11f)); gbc.gridx = 0; gbc.gridy = gridy++; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(0, 40, 0, 0); mainPanel.add(wsSecurityAuthNLabel, gbc); // Password type list passwordTypeComboBox = new JComboBox(passwordTypes); passwordTypeComboBox.setRenderer(new ComboBoxTooltipRenderer()); gbc.gridx = 0; gbc.gridy = gridy++; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(10, 40, 0, 0); mainPanel.add(passwordTypeComboBox, gbc); // 'Add timestamp' checkbox addTimestampCheckBox = new JCheckBox("Add a timestamp to SOAP message"); gbc.gridx = 0; gbc.gridy = gridy++; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(5, 40, 10, 10); mainPanel.add(addTimestampCheckBox, gbc); // Set username and password button; setWsdlUsernamePasswordButton = new JButton("Set username and password"); gbc.gridx = 0; gbc.gridy = gridy++; gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.EAST; gbc.insets = new Insets(0, 40, 10, 10); gbc.weightx = 1.0; gbc.weighty = 1.0; // add any vertical space to this component mainPanel.add(setWsdlUsernamePasswordButton, gbc); setWsdlUsernamePasswordButton.addActionListener(usernamePasswordListener); addDivider(mainPanel, SwingConstants.BOTTOM, true); // OK/Cancel button panel JPanel okCancelPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); JButton okButton = new JButton("OK"); okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { okPressed(); } }); JButton cancelButton = new JButton("Cancel"); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { cancelPressed(); } }); okCancelPanel.add(cancelButton); okCancelPanel.add(okButton); // Enable/disable controls based on what is the current security profiles String securityProfile = oldBean.getSecurityProfile(); if (securityProfile == null) { noSecurityRadioButton.setSelected(true); } else { if (securityProfile.equals(SecurityProfiles.WSSECURITY_USERNAMETOKEN_PLAINTEXTPASSWORD) || securityProfile.equals(SecurityProfiles.WSSECURITY_USERNAMETOKEN_DIGESTPASSWORD) || securityProfile.equals(SecurityProfiles.WSSECURITY_TIMESTAMP_USERNAMETOKEN_PLAINTEXTPASSWORD) || securityProfile.equals(SecurityProfiles.WSSECURITY_TIMESTAMP_USERNAMETOKEN_DIGESTPASSWORD)) { wsSecurityAuthNRadioButton.setSelected(true); } if (securityProfile.equals(SecurityProfiles.HTTP_BASIC_AUTHN) || securityProfile.equals(SecurityProfiles.HTTP_DIGEST_AUTHN)) { httpSecurityAuthNRadioButton.setSelected(true); } if (securityProfile.equals(SecurityProfiles.SAMLWEBSSOAUTH)) { SAMLSecurityAuthNRadioButton.setSelected(true); } if (securityProfile.equals(SecurityProfiles.WSSECURITY_USERNAMETOKEN_PLAINTEXTPASSWORD) || securityProfile .equals(SecurityProfiles.WSSECURITY_TIMESTAMP_USERNAMETOKEN_PLAINTEXTPASSWORD)) { passwordTypeComboBox.setSelectedItem(PLAINTEXT_PASSWORD); } else if (securityProfile.equals(SecurityProfiles.WSSECURITY_USERNAMETOKEN_DIGESTPASSWORD) || securityProfile.equals(SecurityProfiles.WSSECURITY_TIMESTAMP_USERNAMETOKEN_DIGESTPASSWORD)) { passwordTypeComboBox.setSelectedItem(DIGEST_PASSWORD); } if (securityProfile.equals(SecurityProfiles.WSSECURITY_TIMESTAMP_USERNAMETOKEN_DIGESTPASSWORD) || securityProfile .equals(SecurityProfiles.WSSECURITY_TIMESTAMP_USERNAMETOKEN_PLAINTEXTPASSWORD)) { addTimestampCheckBox.setSelected(true); } else { addTimestampCheckBox.setSelected(false); } } // Put everything together JPanel layoutPanel = new JPanel(new BorderLayout()); layoutPanel.add(titlePanel, BorderLayout.NORTH); layoutPanel.add(mainPanel, BorderLayout.CENTER); layoutPanel.add(okCancelPanel, BorderLayout.SOUTH); layoutPanel.setPreferredSize(new Dimension(550, 490)); this.getContentPane().add(layoutPanel); this.pack(); }
From source file:com.emental.mindraider.ui.frames.MindRaiderMainWindow.java
private MindRaiderMainWindow() { super(MindRaider.getTitle(), Gfx.getGraphicsConfiguration()); addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0);// w ww .j av a 2 s . co m } }); // catch resize addComponentListener(this); configuration = new ConfigurationBean(); // drag & drop registration DropTarget dropTarget = new DropTarget(this, (DropTargetListener) this); this.setDropTarget(dropTarget); // warn on different java version // checkJavaVersion(); singleton = this; setIconImage(IconsRegistry.getImage("programIcon.gif")); SplashScreen splash = new SplashScreen(this, false); splash.showSplashScreen(); // kernel init MindRaider.preSetProfiles(); // message in here because of locales logger.debug(Messages.getString("MindRaiderJFrame.bootingKernel")); // master control panel MindRaider.setMasterToolBar(new MasterToolBar()); getContentPane().add(MindRaider.masterToolBar, BorderLayout.NORTH); // status bar getContentPane().add(StatusBar.getStatusBar(), BorderLayout.SOUTH); // build menu buildMenu(MindRaider.spidersGraph); // profile MindRaider.setProfiles(); // left sidebar: folder/notebooks hierarchy, taxonomies, ... final JTabbedPane leftSidebar = new JTabbedPane(SwingConstants.BOTTOM); leftSidebar.setTabPlacement(SwingConstants.TOP); // TODO add icons to tabs leftSidebar.addTab(Messages.getString("MindRaiderJFrame.explorer"), ExplorerJPanel.getInstance()); // TODO just blank panel //leftSidebar.addTab("Tags",new OutlookBarMain()); leftSidebar.addTab( Messages.getString("MindRaiderJFrame.trash"), /* IconsRegistry.getImageIcon("trashFull.png"), */ TrashJPanel.getInstance()); leftSidebar.setSelectedIndex(0); leftSidebar.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent arg0) { if (arg0.getSource() instanceof JTabbedPane) { if (leftSidebar.getSelectedIndex() == 1) { // refresh trash TrashJPanel.getInstance().refresh(); } } } }); // main panel: (notebook outline & RDF Navigator) + Control panel JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BorderLayout()); mainPanel.add(OutlineJPanel.getInstance(), BorderLayout.CENTER); // split: left sidebar/main panel leftSidebarSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftSidebar, mainPanel); leftSidebarSplitPane.setOneTouchExpandable(true); leftSidebarSplitPane.setDividerLocation(200); leftSidebarSplitPane.setLastDividerLocation(200); leftSidebarSplitPane.setDividerSize(6); leftSidebarSplitPane.setContinuousLayout(true); getContentPane().add(leftSidebarSplitPane, BorderLayout.CENTER); Gfx.centerAndShowWindow(this, 1024, 768); MindRaider.postSetProfiles(); if (!configuration.isShowSpidersTagSnailPane()) { OutlineJPanel.getInstance().hideSpiders(); } splash.hideSplash(); }
From source file:net.sf.taverna.t2.activities.spreadsheet.views.SpreadsheetImportConfigView.java
@Override protected void initialise() { super.initialise(); newConfiguration = getJson().deepCopy(); // title/*from ww w . ja v a 2 s. co m*/ titlePanel = new JPanel(new BorderLayout()); titlePanel.setBackground(Color.WHITE); addDivider(titlePanel, SwingConstants.BOTTOM, true); titleLabel = new JLabel(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.panelTitle")); titleLabel.setFont(titleLabel.getFont().deriveFont(Font.BOLD, 13.5f)); titleIcon = new JLabel(""); titleMessage = new DialogTextArea(DEFAULT_MESSAGE); titleMessage.setMargin(new Insets(5, 10, 10, 10)); // titleMessage.setMinimumSize(new Dimension(0, 30)); titleMessage.setFont(titleMessage.getFont().deriveFont(11f)); titleMessage.setEditable(false); titleMessage.setFocusable(false); // titleMessage.setFont(titleLabel.getFont().deriveFont(Font.PLAIN, // 12f)); // column range columnLabel = new JLabel( SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.columnSectionLabel")); JsonNode columnRange = newConfiguration.get("columnRange"); columnFromValue = new JTextField(new UpperCaseDocument(), SpreadsheetUtils.getColumnLabel(columnRange.get("start").intValue()), 4); columnFromValue.setMinimumSize(columnFromValue.getPreferredSize()); columnToValue = new JTextField(new UpperCaseDocument(), SpreadsheetUtils.getColumnLabel(columnRange.get("end").intValue()), 4); columnToValue.setMinimumSize(columnToValue.getPreferredSize()); columnFromValue.getDocument().addDocumentListener(new DocumentListener() { public void changedUpdate(DocumentEvent e) { } public void insertUpdate(DocumentEvent e) { checkValue(columnFromValue.getText()); } public void removeUpdate(DocumentEvent e) { checkValue(columnFromValue.getText()); } private void checkValue(String text) { if (text.trim().equals("")) { addErrorMessage(EMPTY_FROM_COLUMN_ERROR_MESSAGE); } else if (text.trim().matches("[A-Za-z]+")) { String fromColumn = columnFromValue.getText().toUpperCase(); String toColumn = columnToValue.getText().toUpperCase(); int fromColumnIndex = SpreadsheetUtils.getColumnIndex(fromColumn); int toColumnIndex = SpreadsheetUtils.getColumnIndex(toColumn); if (checkColumnRange(fromColumnIndex, toColumnIndex)) { columnMappingTableModel.setFromColumn(fromColumnIndex); columnMappingTableModel.setToColumn(toColumnIndex); newConfiguration.set("columnRange", newConfiguration.objectNode() .put("start", fromColumnIndex).put("end", toColumnIndex)); validatePortNames(); } removeErrorMessage(FROM_COLUMN_ERROR_MESSAGE); removeErrorMessage(EMPTY_FROM_COLUMN_ERROR_MESSAGE); } else { addErrorMessage(FROM_COLUMN_ERROR_MESSAGE); removeErrorMessage(EMPTY_FROM_COLUMN_ERROR_MESSAGE); } } }); columnToValue.getDocument().addDocumentListener(new DocumentListener() { public void changedUpdate(DocumentEvent e) { } public void insertUpdate(DocumentEvent e) { checkValue(columnToValue.getText()); } public void removeUpdate(DocumentEvent e) { checkValue(columnToValue.getText()); } private void checkValue(String text) { if (text.trim().equals("")) { addErrorMessage(EMPTY_TO_COLUMN_ERROR_MESSAGE); } else if (text.trim().matches("[A-Za-z]+")) { String fromColumn = columnFromValue.getText().toUpperCase(); String toColumn = columnToValue.getText().toUpperCase(); int fromColumnIndex = SpreadsheetUtils.getColumnIndex(fromColumn); int toColumnIndex = SpreadsheetUtils.getColumnIndex(toColumn); if (checkColumnRange(fromColumnIndex, toColumnIndex)) { columnMappingTableModel.setFromColumn(fromColumnIndex); columnMappingTableModel.setToColumn(toColumnIndex); newConfiguration.set("columnRange", newConfiguration.objectNode() .put("start", fromColumnIndex).put("end", toColumnIndex)); validatePortNames(); } removeErrorMessage(TO_COLUMN_ERROR_MESSAGE); removeErrorMessage(EMPTY_TO_COLUMN_ERROR_MESSAGE); } else { addErrorMessage(TO_COLUMN_ERROR_MESSAGE); removeErrorMessage(EMPTY_TO_COLUMN_ERROR_MESSAGE); } } }); // row range rowLabel = new JLabel(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.rowSectionLabel")); addDivider(rowLabel, SwingConstants.TOP, false); rowSelectAllOption = new JCheckBox( SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.selectAllRowsOption")); rowExcludeFirstOption = new JCheckBox( SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.excludeHeaderRowOption")); rowIgnoreBlankRows = new JCheckBox( SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.ignoreBlankRowsOption")); rowSelectAllOption.setFocusable(false); rowExcludeFirstOption.setFocusable(false); JsonNode rowRange = newConfiguration.get("rowRange"); rowFromValue = new JTextField(new NumericDocument(), String.valueOf(rowRange.get("start").intValue() + 1), 4); if (rowRange.get("end").intValue() == -1) { rowToValue = new JTextField(new NumericDocument(), "", 4); } else { rowToValue = new JTextField(new NumericDocument(), String.valueOf(rowRange.get("end").intValue() + 1), 4); } rowFromValue.setMinimumSize(rowFromValue.getPreferredSize()); rowToValue.setMinimumSize(rowToValue.getPreferredSize()); if (newConfiguration.get("allRows").booleanValue()) { rowSelectAllOption.setSelected(true); rowFromValue.setEditable(false); rowFromValue.setEnabled(false); rowToValue.setEditable(false); rowToValue.setEnabled(false); } else { rowExcludeFirstOption.setEnabled(false); } rowExcludeFirstOption.setSelected(newConfiguration.get("excludeFirstRow").booleanValue()); rowIgnoreBlankRows.setSelected(newConfiguration.get("ignoreBlankRows").booleanValue()); rowFromValue.getDocument().addDocumentListener(new DocumentListener() { public void changedUpdate(DocumentEvent e) { } public void insertUpdate(DocumentEvent e) { checkValue(rowFromValue.getText()); } public void removeUpdate(DocumentEvent e) { checkValue(rowFromValue.getText()); } private void checkValue(String text) { if (text.trim().equals("")) { addErrorMessage(EMPTY_FROM_ROW_ERROR_MESSAGE); } else if (text.trim().matches("[1-9][0-9]*")) { checkRowRange(rowFromValue.getText(), rowToValue.getText()); int fromRow = Integer.parseInt(rowFromValue.getText()); ((ObjectNode) newConfiguration.get("rowRange")).put("start", fromRow - 1); removeErrorMessage(FROM_ROW_ERROR_MESSAGE); removeErrorMessage(EMPTY_FROM_ROW_ERROR_MESSAGE); } else { addErrorMessage(FROM_ROW_ERROR_MESSAGE); removeErrorMessage(EMPTY_FROM_ROW_ERROR_MESSAGE); } } }); rowToValue.getDocument().addDocumentListener(new DocumentListener() { public void changedUpdate(DocumentEvent e) { } public void insertUpdate(DocumentEvent e) { checkValue(rowToValue.getText()); } public void removeUpdate(DocumentEvent e) { checkValue(rowToValue.getText()); } private void checkValue(String text) { if (text.trim().equals("")) { ((ObjectNode) newConfiguration.get("rowRange")).put("end", -1); removeErrorMessage(TO_ROW_ERROR_MESSAGE); removeErrorMessage(INCONSISTENT_ROW_MESSAGE); } else if (text.trim().matches("[0-9]+")) { checkRowRange(rowFromValue.getText(), rowToValue.getText()); int toRow = Integer.parseInt(rowToValue.getText()); ((ObjectNode) newConfiguration.get("rowRange")).put("end", toRow - 1); removeErrorMessage(TO_ROW_ERROR_MESSAGE); } else { addErrorMessage(TO_ROW_ERROR_MESSAGE); } } }); rowSelectAllOption.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED) { newConfiguration.put("allRows", true); rowExcludeFirstOption.setEnabled(true); if (rowExcludeFirstOption.isSelected()) { rowFromValue.setText("2"); } else { rowFromValue.setText("1"); } rowToValue.setText(""); rowFromValue.setEditable(false); rowFromValue.setEnabled(false); rowToValue.setEditable(false); rowToValue.setEnabled(false); } else { newConfiguration.put("allRows", false); rowExcludeFirstOption.setEnabled(false); rowFromValue.setEditable(true); rowFromValue.setEnabled(true); rowToValue.setEditable(true); rowToValue.setEnabled(true); } } }); rowExcludeFirstOption.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { if (e.getStateChange() == ItemEvent.SELECTED) { newConfiguration.put("excludeFirstRow", true); rowFromValue.setText("2"); ((ObjectNode) newConfiguration.get("rowRange")).put("start", 1); } else { newConfiguration.put("excludeFirstRow", false); rowFromValue.setText("1"); ((ObjectNode) newConfiguration.get("rowRange")).put("start", 0); } } }); rowIgnoreBlankRows.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { newConfiguration.put("ignoreBlankRows", e.getStateChange() == ItemEvent.SELECTED); } }); // empty cells emptyCellLabel = new JLabel( SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.emptyCellSectionLabel")); addDivider(emptyCellLabel, SwingConstants.TOP, false); emptyCellButtonGroup = new ButtonGroup(); emptyCellEmptyStringOption = new JRadioButton( SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.emptyStringOption")); emptyCellUserDefinedOption = new JRadioButton( SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.userDefinedOption")); emptyCellErrorValueOption = new JRadioButton( SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.generateErrorOption")); emptyCellEmptyStringOption.setFocusable(false); emptyCellUserDefinedOption.setFocusable(false); emptyCellErrorValueOption.setFocusable(false); emptyCellUserDefinedValue = new JTextField(newConfiguration.get("emptyCellValue").textValue()); emptyCellButtonGroup.add(emptyCellEmptyStringOption); emptyCellButtonGroup.add(emptyCellUserDefinedOption); emptyCellButtonGroup.add(emptyCellErrorValueOption); if (newConfiguration.get("emptyCellPolicy").textValue().equals("GENERATE_ERROR")) { emptyCellErrorValueOption.setSelected(true); emptyCellUserDefinedValue.setEnabled(false); emptyCellUserDefinedValue.setEditable(false); } else if (newConfiguration.get("emptyCellPolicy").textValue().equals("EMPTY_STRING")) { emptyCellEmptyStringOption.setSelected(true); emptyCellUserDefinedValue.setEnabled(false); emptyCellUserDefinedValue.setEditable(false); } else { emptyCellUserDefinedOption.setSelected(true); emptyCellUserDefinedValue.setText(newConfiguration.get("emptyCellValue").textValue()); emptyCellUserDefinedValue.setEnabled(true); emptyCellUserDefinedValue.setEditable(true); } emptyCellEmptyStringOption.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { newConfiguration.put("emptyCellPolicy", "EMPTY_STRING"); emptyCellUserDefinedValue.setEnabled(false); emptyCellUserDefinedValue.setEditable(false); } }); emptyCellUserDefinedOption.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { newConfiguration.put("emptyCellPolicy", "USER_DEFINED"); emptyCellUserDefinedValue.setEnabled(true); emptyCellUserDefinedValue.setEditable(true); emptyCellUserDefinedValue.requestFocusInWindow(); } }); emptyCellErrorValueOption.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { newConfiguration.put("emptyCellPolicy", "GENERATE_ERROR"); emptyCellUserDefinedValue.setEnabled(false); emptyCellUserDefinedValue.setEditable(false); } }); emptyCellUserDefinedValue.getDocument().addDocumentListener(new DocumentListener() { public void changedUpdate(DocumentEvent e) { newConfiguration.put("emptyCellValue", emptyCellUserDefinedValue.getText()); } public void insertUpdate(DocumentEvent e) { newConfiguration.put("emptyCellValue", emptyCellUserDefinedValue.getText()); } public void removeUpdate(DocumentEvent e) { newConfiguration.put("emptyCellValue", emptyCellUserDefinedValue.getText()); } }); // column mappings columnMappingLabel = new JLabel( SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.columnMappingSectionLabel")); addDivider(columnMappingLabel, SwingConstants.TOP, false); Map<String, String> columnToPortMapping = new HashMap<>(); if (newConfiguration.has("columnNames")) { for (JsonNode columnName : newConfiguration.get("columnNames")) { columnToPortMapping.put(columnName.get("column").textValue(), columnName.get("port").textValue()); } } columnMappingTableModel = new SpreadsheetImportConfigTableModel(columnFromValue.getText(), columnToValue.getText(), columnToPortMapping); columnMappingTable = new JTable(); columnMappingTable.setRowSelectionAllowed(false); columnMappingTable.getTableHeader().setReorderingAllowed(false); columnMappingTable.setGridColor(Color.LIGHT_GRAY); // columnMappingTable.setFocusable(false); columnMappingTable.setColumnModel(new DefaultTableColumnModel() { public TableColumn getColumn(int columnIndex) { TableColumn column = super.getColumn(columnIndex); if (columnIndex == 0) { column.setMaxWidth(100); } return column; } }); TableCellEditor defaultEditor = columnMappingTable.getDefaultEditor(String.class); if (defaultEditor instanceof DefaultCellEditor) { DefaultCellEditor defaultCellEditor = (DefaultCellEditor) defaultEditor; defaultCellEditor.setClickCountToStart(1); Component editorComponent = defaultCellEditor.getComponent(); if (editorComponent instanceof JTextComponent) { final JTextComponent textField = (JTextComponent) editorComponent; textField.getDocument().addDocumentListener(new DocumentListener() { public void changedUpdate(DocumentEvent e) { updateModel(textField.getText()); } public void insertUpdate(DocumentEvent e) { updateModel(textField.getText()); } public void removeUpdate(DocumentEvent e) { updateModel(textField.getText()); } private void updateModel(String text) { int row = columnMappingTable.getEditingRow(); int column = columnMappingTable.getEditingColumn(); columnMappingTableModel.setValueAt(text, row, column); ArrayNode columnNames = newConfiguration.arrayNode(); Map<String, String> columnToPortMapping = columnMappingTableModel.getColumnToPortMapping(); for (Entry<String, String> entry : columnToPortMapping.entrySet()) { columnNames.add(newConfiguration.objectNode().put("column", entry.getKey()).put("port", entry.getValue())); } newConfiguration.put("columnNames", columnNames); validatePortNames(); } }); } } columnMappingTable.setModel(columnMappingTableModel); // output format outputFormatLabel = new JLabel( SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.outputFormatSectionLabel")); outputFormatMultiplePort = new JRadioButton( SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.multiplePortOption")); outputFormatSinglePort = new JRadioButton( SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.singlePortOption")); outputFormatMultiplePort.setFocusable(false); outputFormatSinglePort.setFocusable(false); outputFormatDelimiterLabel = new JLabel( SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.userDefinedCsvDelimiter")); outputFormatDelimiter = new JTextField(newConfiguration.get("csvDelimiter").textValue(), 5); outputFormatButtonGroup = new ButtonGroup(); outputFormatButtonGroup.add(outputFormatMultiplePort); outputFormatButtonGroup.add(outputFormatSinglePort); if (newConfiguration.get("outputFormat").textValue().equals("PORT_PER_COLUMN")) { outputFormatMultiplePort.setSelected(true); outputFormatDelimiterLabel.setEnabled(false); outputFormatDelimiter.setEnabled(false); } else { outputFormatSinglePort.setSelected(true); columnMappingLabel.setEnabled(false); enableTable(columnMappingTable, false); } outputFormatMultiplePort.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { outputFormatDelimiterLabel.setEnabled(false); outputFormatDelimiter.setEnabled(false); columnMappingLabel.setEnabled(true); enableTable(columnMappingTable, true); newConfiguration.put("outputFormat", "PORT_PER_COLUMN"); } }); outputFormatSinglePort.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { outputFormatDelimiterLabel.setEnabled(true); outputFormatDelimiter.setEnabled(true); columnMappingLabel.setEnabled(false); enableTable(columnMappingTable, false); newConfiguration.put("outputFormat", "SINGLE_PORT"); } }); outputFormatDelimiter.getDocument().addDocumentListener(new DocumentListener() { public void changedUpdate(DocumentEvent e) { handleUpdate(); } public void insertUpdate(DocumentEvent e) { handleUpdate(); } public void removeUpdate(DocumentEvent e) { handleUpdate(); } private void handleUpdate() { String text = null; try { text = StringEscapeUtils.unescapeJava(outputFormatDelimiter.getText()); } catch (RuntimeException re) { } if (text == null || text.length() == 0) { newConfiguration.put("csvDelimiter", ","); } else { newConfiguration.put("csvDelimiter", text.substring(0, 1)); } } }); // buttons nextButton = new JButton(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.nextButton")); nextButton.setFocusable(false); nextButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { backButton.setVisible(true); nextButton.setVisible(false); cardLayout.last(contentPanel); } }); backButton = new JButton(SpreadsheetImportUIText.getString("SpreadsheetImportConfigView.backButton")); backButton.setFocusable(false); backButton.setVisible(false); backButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { nextButton.setVisible(true); backButton.setVisible(false); cardLayout.first(contentPanel); } }); buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); addDivider(buttonPanel, SwingConstants.TOP, true); removeAll(); layoutPanel(); }
From source file:edu.ku.brc.af.tasks.BaseTask.java
/** * Helper.//from w w w . ja v a 2 s . co m * @param label the (localized) label string * @param iconNameArg the name of the icon (as registered with IconManager) * @param hint a (localized) hint string * @param menus a List of JComponents to be added in a drop down box * @param actionListener the listener to notify when the button is clicked * @return the drop down button */ protected ToolBarDropDownBtn createToolbarButton(final String label, final String iconNameArg, final String hint, final List<JComponent> menus, final ActionListener actionListener) { ImageIcon buttonIcon = IconManager.getIcon(iconNameArg, IconManager.IconSize.Std24); ToolBarDropDownBtn btn = new ToolBarDropDownBtn(label, buttonIcon, SwingConstants.BOTTOM, menus); if (toolbarBtnFont != null) { btn.setFont(toolbarBtnFont); } btn.setStatusBarHintText(hint); btn.addActionListener(actionListener); return btn; }
From source file:edu.ku.brc.af.tasks.BaseTask.java
/** * @param label//from w w w . jav a 2 s . c o m * @param iconNameArg * @param hint * @param menus * @return */ protected MemoryDropDownButton createMemoryToolbarButton(final String label, final String iconNameArg, final String hint, final List<JComponent> menus) { ImageIcon buttonIcon = IconManager.getIcon(iconNameArg, IconManager.IconSize.Std24); MemoryDropDownButton btn = new MemoryDropDownButton(label, buttonIcon, SwingConstants.BOTTOM, menus); btn.setStatusBarHintText(hint); return btn; }
From source file:edu.ku.brc.specify.plugins.latlon.LatLonUI.java
/** * Creates the UI.// ww w.ja v a 2 s. c o m * @param localityCEP the locality object (can be null) */ protected void createEditUI() { loadAndPushResourceBundle("specify_plugins"); PanelBuilder builder = new PanelBuilder(new FormLayout("p", "p, 2px, p"), this); Color bgColor = getBackground(); bgColor = new Color(Math.min(bgColor.getRed() + 20, 255), Math.min(bgColor.getGreen() + 20, 255), Math.min(bgColor.getBlue() + 20, 255)); //System.out.println(bgColor); setBorder(BorderFactory.createCompoundBorder(BorderFactory.createLineBorder(bgColor), BorderFactory.createEmptyBorder(4, 4, 4, 4))); for (int i = 0; i < types.length; i++) { typeMapper.put(types[i], typeStrs[i]); } currentType = LatLonUIIFace.LatLonType.LLPoint; pointImages = new ImageIcon[pointNames.length]; for (int i = 0; i < pointNames.length; i++) { pointImages[i] = IconManager.getIcon(pointNames[i], IconManager.IconSize.Std16); } String[] formatLabels = new String[formats.length]; for (int i = 0; i < formats.length; i++) { formatLabels[i] = getResourceString(formats[i]); } cardPanel = new JPanel(cardLayout); formatSelector = createComboBox(formatLabels); latLonPanes = new JComponent[formatLabels.length]; formatSelector.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { swapForm(formatSelector.getSelectedIndex(), currentType); cardLayout.show(cardPanel, ((JComboBox) ae.getSource()).getSelectedItem().toString()); //stateChanged(null); } }); Dimension preferredSize = new Dimension(0, 0); cardSubPanes = new JPanel[formats.length * 2]; panels = new DDDDPanel[formats.length * 2]; int paneInx = 0; for (int i = 0; i < formats.length; i++) { cardSubPanes[i] = new JPanel(new BorderLayout()); try { String packageName = "edu.ku.brc.specify.plugins.latlon."; DDDDPanel latLon1 = Class.forName(packageName + formatClass[i]).asSubclass(DDDDPanel.class) .newInstance(); latLon1.setIsRequired(isRequired); latLon1.setViewMode(isViewMode); latLon1.init(); latLon1.setChangeListener(this); JPanel panel1 = latLon1; panel1.setBorder(panelBorder); panels[paneInx++] = latLon1; latLonPanes[i] = panel1; DDDDPanel latlon2 = Class.forName(packageName + formatClass[i]).asSubclass(DDDDPanel.class) .newInstance(); latlon2.setIsRequired(isRequired); latlon2.setViewMode(isViewMode); latlon2.init(); latlon2.setChangeListener(this); panels[paneInx++] = latlon2; JTabbedPane tabbedPane = new JTabbedPane( UIHelper.getOSType() == UIHelper.OSTYPE.MacOSX ? SwingConstants.BOTTOM : SwingConstants.RIGHT); tabbedPane.addTab(null, pointImages[0], panels[paneInx - 2]); tabbedPane.addTab(null, pointImages[0], panels[paneInx - 1]); latLonPanes[i] = tabbedPane; Dimension size = tabbedPane.getPreferredSize(); preferredSize.width = Math.max(preferredSize.width, size.width); preferredSize.height = Math.max(preferredSize.height, size.height); tabbedPane.removeAll(); cardSubPanes[i].add(panel1, BorderLayout.CENTER); cardPanel.add(formatLabels[i], cardSubPanes[i]); /*if (locality != null) { latLon1.set(locality.getLatitude1(), locality.getLongitude1(), locality.getLat1text(), locality.getLong1text()); latlon2.set(locality.getLatitude2(), locality.getLongitude2(), locality.getLat2text(), locality.getLong2text()); }*/ } catch (Exception e) { e.printStackTrace(); edu.ku.brc.af.core.UsageTracker.incrHandledUsageCount(); edu.ku.brc.exceptions.ExceptionTracker.getInstance().capture(LatLonUI.class, e); } } // Makes they are all the same size for (int i = 0; i < formats.length; i++) { cardSubPanes[i].setPreferredSize(preferredSize); } //final LatLonPanel thisPanel = this; PanelBuilder botBtnBar = new PanelBuilder(new FormLayout("p:g,p,10px,p,10px,p,p:g", "p")); ButtonGroup btnGroup = new ButtonGroup(); botBtns = new JToggleButton[typeNames.length]; if (UIHelper.isMacOS()) { /*for (int i=0;i<botBtns.length;i++) { ImageIcon selIcon = IconManager.getIcon(typeNames[i]+"Sel", IconManager.IconSize.Std16); ImageIcon unselIcon = IconManager.getIcon(typeNames[i], IconManager.IconSize.Std16); MacIconRadioButton rb = new MacIconRadioButton(selIcon, unselIcon); botBtns[i] = rb; rb.setBorder(new MacBtnBorder()); Dimension size = rb.getPreferredSize(); int max = Math.max(size.width, size.height); size.setSize(max, max); rb.setPreferredSize(size); }*/ BorderedRadioButton.setSelectedBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED)); BorderedRadioButton.setUnselectedBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED)); for (int i = 0; i < botBtns.length; i++) { BorderedRadioButton rb = new BorderedRadioButton( IconManager.getIcon(typeNames[i], IconManager.IconSize.Std16)); botBtns[i] = rb; rb.makeSquare(); rb.setBorder(new MacBtnBorder()); } } else { BorderedRadioButton.setSelectedBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED)); BorderedRadioButton.setUnselectedBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED)); for (int i = 0; i < botBtns.length; i++) { BorderedRadioButton rb = new BorderedRadioButton( IconManager.getIcon(typeNames[i], IconManager.IconSize.Std16)); botBtns[i] = rb; rb.makeSquare(); } } for (int i = 0; i < botBtns.length; i++) { botBtns[i].setToolTipText(typeToolTips[i]); botBtnBar.add(botBtns[i], cc.xy((i * 2) + 2, 1)); btnGroup.add(botBtns[i]); selectedTypeHash.put(botBtns[i], types[i]); botBtns[i].addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ce) { stateChanged(null); currentType = selectedTypeHash.get(ce.getSource()); swapForm(formatSelector.getSelectedIndex(), currentType); } }); } botBtns[0].setSelected(true); if (isViewMode) { typeLabel = createLabel(" "); } ActionListener infoAL = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doPrefs(); } }; JButton infoBtn = UIHelper.createIconBtn("Preferences", IconManager.IconSize.Std16, getResourceString("PREFERENCES"), true, infoAL); infoBtn.setEnabled(true); PanelBuilder topPane = new PanelBuilder( new FormLayout("l:p, c:p:g" + (isViewMode ? "" : ",4px,p,8px"), "p")); topPane.add(formatSelector, cc.xy(1, 1)); topPane.add(isViewMode ? typeLabel : botBtnBar.getPanel(), cc.xy(2, 1)); if (!isViewMode) topPane.add(infoBtn, cc.xy(4, 1)); builder.add(topPane.getPanel(), cc.xy(1, 1)); builder.add(cardPanel, cc.xy(1, 3)); prefsPanel = new PrefsPanel(false); prefsPanel.add(getResourceString("LatLonUI.LL_SEP")); prefsPanel.add(CompType.eCheckbox, getResourceString("LatLonUI.LATDEF_DIR"), LAT_PREF, Boolean.class, true); prefsPanel.add(CompType.eCheckbox, getResourceString("LatLonUI.LONDEF_DIR"), LON_PREF, Boolean.class, true); prefsPanel.add(CompType.eComboBox, getResourceString("LatLonUI.DEF_TYP"), TYP_PREF, Integer.class, typeNamesLabels, 0); prefsPanel.add(CompType.eComboBox, getResourceString("LatLonUI.DEF_FMT"), FMT_PREF, Integer.class, formatLabels, 0); prefsPanel.createForm(null, null); popResourceBundle(); }
From source file:com.josescalia.tumblr.form.PreferenceForm.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 www . j a v a2 s . com*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { bindingGroup = new org.jdesktop.beansbinding.BindingGroup(); rbGroupUseProxy = new ButtonGroup(); folderChooser = new JFileChooser(); jTabbedPane1 = new JTabbedPane(); jPanel1 = new JPanel(); jPanel10 = new JPanel(); jLabel29 = new JLabel(); jLabel26 = new JLabel(); jLabel25 = new JLabel(); jLabel24 = new JLabel(); jLabel28 = new JLabel(); jLabel27 = new JLabel(); jPanel12 = new JPanel(); txtProxyPort = new JTextField(); rbUseProxy = new JRadioButton(); jLabel2 = new JLabel(); rbNoProxy = new JRadioButton(); txtProxyPassword = new JPasswordField(); jLabel3 = new JLabel(); txtProxyUsername = new JTextField(); btnSaveProxyConfig = new JButton(); jLabel1 = new JLabel(); jLabel4 = new JLabel(); txtProxyHost = new JTextField(); checkProxyNeedAuth = new JCheckBox(); jPanel2 = new JPanel(); jPanel11 = new JPanel(); jLabel35 = new JLabel(); jLabel30 = new JLabel(); jLabel33 = new JLabel(); jLabel32 = new JLabel(); jLabel31 = new JLabel(); jLabel34 = new JLabel(); jPanel14 = new JPanel(); txtDefaultFolderPath1 = new JTextField(); jLabel6 = new JLabel(); txtDefaultFolderPath = new JTextField(); jLabel7 = new JLabel(); btnChooseFolder = new JButton(); btnSaveAppConfig = new JButton(); jPanel7 = new JPanel(); jPanel9 = new JPanel(); jLabel18 = new JLabel(); jLabel23 = new JLabel(); jLabel19 = new JLabel(); jLabel21 = new JLabel(); jLabel20 = new JLabel(); jLabel22 = new JLabel(); jPanel13 = new JPanel(); jLabel8 = new JLabel(); btnOpenOtherCacheFolder = new JButton(); btnDeleteCache = new JButton(); jLabel9 = new JLabel(); txtTotalFileSize1 = new JTextField(); txtTotalFileSize = new JTextField(); jPanel3 = new JPanel(); jPanel5 = new JPanel(); txtTotalLogSize = new JTextField(); jLabel11 = new JLabel(); txtTotalLog = new JTextField(); btnCleanLog = new JButton(); jLabel13 = new JLabel(); jPanel6 = new JPanel(); jLabel12 = new JLabel(); jScrollPane1 = new JScrollPane(); txtLogContent = new JTextArea(); jPanel8 = new JPanel(); jLabel17 = new JLabel(); jLabel16 = new JLabel(); jLabel15 = new JLabel(); jLabel14 = new JLabel(); jPanel4 = new JPanel(); jPanel15 = new JPanel(); txtAppLookAndFeel = new JTextField(); jLabel10 = new JLabel(); btnSaveLF = new JButton(); btnSelectLF = new JButton(); jPanel16 = new JPanel(); jLabel41 = new JLabel(); jLabel36 = new JLabel(); jLabel40 = new JLabel(); jLabel37 = new JLabel(); jLabel38 = new JLabel(); jLabel39 = new JLabel(); jLabel5 = new JLabel(); jPanel1.setBorder(BorderFactory.createEtchedBorder()); jPanel10.setBackground(Color.white); jPanel10.setBorder(BorderFactory.createEtchedBorder()); jLabel29.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N jLabel29.setText("set up this Proxy Connection."); jLabel26.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N jLabel26.setText("if this application need to connect to the internet. The setting of this "); jLabel25.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N jLabel25.setText("The Proxy Connection is a set of configuration which will be applied"); jLabel24.setFont(new Font("Liberation Sans", 1, 12)); // NOI18N jLabel24.setText("Info :"); jLabel28.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N jLabel28.setText("configuration. Contact Computer Network Administrator to correctly"); jLabel27.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N jLabel27.setText("Proxy Connection should be match with the computer network"); GroupLayout jPanel10Layout = new GroupLayout(jPanel10); jPanel10.setLayout(jPanel10Layout); jPanel10Layout.setHorizontalGroup(jPanel10Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel10Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel10Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(jLabel28).addComponent(jLabel25).addComponent(jLabel24) .addComponent(jLabel26).addComponent(jLabel27).addComponent(jLabel29)) .addContainerGap())); jPanel10Layout.setVerticalGroup(jPanel10Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel10Layout.createSequentialGroup().addContainerGap().addComponent(jLabel24) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel25) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel26) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel27) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel28) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel29) .addContainerGap())); jPanel12.setBorder(BorderFactory.createEtchedBorder()); txtProxyPort.setEnabled(false); org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${proxyConnection.proxyPort}"), txtProxyPort, org.jdesktop.beansbinding.BeanProperty.create("text")); bindingGroup.addBinding(binding); rbGroupUseProxy.add(rbUseProxy); rbUseProxy.setText("Use Proxy"); rbUseProxy.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { rbUseProxyActionPerformed(evt); } }); jLabel2.setText("Proxy Port"); rbGroupUseProxy.add(rbNoProxy); rbNoProxy.setText("No Proxy"); rbNoProxy.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { rbNoProxyActionPerformed(evt); } }); txtProxyPassword.setEnabled(false); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${proxyConnection.proxyPassword}"), txtProxyPassword, org.jdesktop.beansbinding.BeanProperty.create("text")); bindingGroup.addBinding(binding); jLabel3.setText("Username "); txtProxyUsername.setEnabled(false); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${proxyConnection.proxyUsername}"), txtProxyUsername, org.jdesktop.beansbinding.BeanProperty.create("text")); bindingGroup.addBinding(binding); btnSaveProxyConfig.setIcon(new ImageIcon(getClass().getResource("/icons/edit.png"))); // NOI18N btnSaveProxyConfig.setText("Save"); btnSaveProxyConfig.setHorizontalTextPosition(SwingConstants.CENTER); btnSaveProxyConfig.setVerticalTextPosition(SwingConstants.BOTTOM); btnSaveProxyConfig.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSaveProxyConfigActionPerformed(evt); } }); jLabel1.setText("Proxy Host"); jLabel4.setText("Password"); txtProxyHost.setEnabled(false); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${proxyConnection.proxyHost}"), txtProxyHost, org.jdesktop.beansbinding.BeanProperty.create("text")); bindingGroup.addBinding(binding); checkProxyNeedAuth.setText("Proxy Need Authentication"); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${bUseProxyAuth}"), checkProxyNeedAuth, org.jdesktop.beansbinding.BeanProperty.create("selected")); bindingGroup.addBinding(binding); checkProxyNeedAuth.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { checkProxyNeedAuthActionPerformed(evt); } }); GroupLayout jPanel12Layout = new GroupLayout(jPanel12); jPanel12.setLayout(jPanel12Layout); jPanel12Layout.setHorizontalGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel12Layout.createSequentialGroup().addContainerGap().addGroup(jPanel12Layout .createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel12Layout.createSequentialGroup().addComponent(rbNoProxy) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(rbUseProxy)) .addGroup(jPanel12Layout.createSequentialGroup().addGroup(jPanel12Layout .createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(jLabel1, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3).addComponent(jLabel4)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(txtProxyPort, GroupLayout.PREFERRED_SIZE, 105, GroupLayout.PREFERRED_SIZE) .addComponent(txtProxyHost, GroupLayout.PREFERRED_SIZE, 297, GroupLayout.PREFERRED_SIZE) .addGroup(jPanel12Layout .createParallelGroup(GroupLayout.Alignment.TRAILING, false) .addComponent(txtProxyPassword, GroupLayout.Alignment.LEADING) .addComponent(txtProxyUsername, GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 227, GroupLayout.PREFERRED_SIZE)))) .addComponent(checkProxyNeedAuth).addComponent(btnSaveProxyConfig, GroupLayout.PREFERRED_SIZE, 89, GroupLayout.PREFERRED_SIZE)) .addContainerGap())); jPanel12Layout.setVerticalGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel12Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(rbNoProxy).addComponent(rbUseProxy)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(jLabel1).addComponent(txtProxyHost, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(jLabel2).addComponent(txtProxyPort, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addGap(4, 4, 4).addComponent(checkProxyNeedAuth) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(txtProxyUsername, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3)) .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(txtProxyPassword, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(btnSaveProxyConfig) .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); GroupLayout jPanel1Layout = new GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout .setHorizontalGroup( jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap() .addComponent(jPanel12, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addContainerGap(286, Short.MAX_VALUE))); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGap(11, 11, 11) .addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(jPanel12, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(jPanel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addContainerGap(165, Short.MAX_VALUE))); jTabbedPane1.addTab("Proxy Connection", jPanel1); jPanel2.setBorder(BorderFactory.createEtchedBorder()); jPanel11.setBackground(Color.white); jPanel11.setBorder(BorderFactory.createEtchedBorder()); jLabel35.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N jLabel35.setText("the application is trigger to open a folder."); jLabel30.setFont(new Font("Liberation Sans", 1, 12)); // NOI18N jLabel30.setText("Info :"); jLabel33.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N jLabel33.setText("application downloading stuff from the internet."); jLabel32.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N jLabel32.setText("Default Download Path is the default folder location when the "); jLabel31.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N jLabel31.setText("This is the set of configuration will be used by this application."); jLabel34.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N jLabel34.setText("Default Folder Viewer is the default of computer programs when "); GroupLayout jPanel11Layout = new GroupLayout(jPanel11); jPanel11.setLayout(jPanel11Layout); jPanel11Layout.setHorizontalGroup(jPanel11Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel11Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel11Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(jLabel30).addComponent(jLabel31).addComponent(jLabel32) .addComponent(jLabel33).addComponent(jLabel34).addComponent(jLabel35)) .addContainerGap())); jPanel11Layout.setVerticalGroup(jPanel11Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel11Layout.createSequentialGroup().addContainerGap().addComponent(jLabel30) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel31) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel32) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel33) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel34) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel35) .addContainerGap())); jPanel14.setBorder(BorderFactory.createEtchedBorder()); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${defaultFolderViewer}"), txtDefaultFolderPath1, org.jdesktop.beansbinding.BeanProperty.create("text")); bindingGroup.addBinding(binding); jLabel6.setText("Default Download Path"); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${defaultDownloadPath}"), txtDefaultFolderPath, org.jdesktop.beansbinding.BeanProperty.create("text")); bindingGroup.addBinding(binding); jLabel7.setText("Default Folder Viewer"); btnChooseFolder.setText("Change"); btnChooseFolder.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnChooseFolderActionPerformed(evt); } }); btnSaveAppConfig.setIcon(new ImageIcon(getClass().getResource("/icons/edit.png"))); // NOI18N btnSaveAppConfig.setText("Save"); btnSaveAppConfig.setHorizontalTextPosition(SwingConstants.CENTER); btnSaveAppConfig.setVerticalTextPosition(SwingConstants.BOTTOM); btnSaveAppConfig.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSaveAppConfigActionPerformed(evt); } }); GroupLayout jPanel14Layout = new GroupLayout(jPanel14); jPanel14.setLayout(jPanel14Layout); jPanel14Layout.setHorizontalGroup(jPanel14Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel14Layout.createSequentialGroup().addContainerGap().addGroup(jPanel14Layout .createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel14Layout.createSequentialGroup() .addComponent(jLabel7, GroupLayout.PREFERRED_SIZE, 161, GroupLayout.PREFERRED_SIZE) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addComponent(txtDefaultFolderPath1, GroupLayout.PREFERRED_SIZE, 258, GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel14Layout.createSequentialGroup() .addComponent(jLabel6, GroupLayout.PREFERRED_SIZE, 161, GroupLayout.PREFERRED_SIZE) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addComponent(txtDefaultFolderPath, GroupLayout.PREFERRED_SIZE, 346, GroupLayout.PREFERRED_SIZE) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnChooseFolder)) .addComponent(btnSaveAppConfig, GroupLayout.PREFERRED_SIZE, 95, GroupLayout.PREFERRED_SIZE)) .addContainerGap())); jPanel14Layout.setVerticalGroup(jPanel14Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel14Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel14Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(jLabel6) .addComponent(txtDefaultFolderPath, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(btnChooseFolder)) .addGap(4, 4, 4) .addGroup(jPanel14Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(jLabel7).addComponent(txtDefaultFolderPath1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnSaveAppConfig).addContainerGap())); GroupLayout jPanel2Layout = new GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout .setHorizontalGroup( jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap() .addComponent(jPanel14, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel11, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addContainerGap())); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false) .addComponent(jPanel11, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel14, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(285, Short.MAX_VALUE))); jTabbedPane1.addTab("Application Config", jPanel2); jPanel9.setBackground(Color.white); jPanel9.setBorder(BorderFactory.createEtchedBorder()); jLabel18.setFont(new Font("Liberation Sans", 1, 12)); // NOI18N jLabel18.setText("Info :"); jLabel23.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N jLabel23.setText("make the application processing faster."); jLabel19.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N jLabel19.setText("Cache Info contains a summary of how much space in hard drive"); jLabel21.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N jLabel21.setText("hard drive space by this application, but if the application need to"); jLabel20.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N jLabel20.setText("used by this application. Deleting cache will reduce the usage of"); jLabel22.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N jLabel22.setText("fetch the data from internet, this cache will be used in order to"); GroupLayout jPanel9Layout = new GroupLayout(jPanel9); jPanel9.setLayout(jPanel9Layout); jPanel9Layout.setHorizontalGroup(jPanel9Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel9Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel9Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(jLabel18).addComponent(jLabel19).addComponent(jLabel20) .addComponent(jLabel21).addComponent(jLabel22).addComponent(jLabel23)) .addContainerGap())); jPanel9Layout.setVerticalGroup(jPanel9Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel9Layout.createSequentialGroup().addContainerGap().addComponent(jLabel18) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel19) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel20) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel21) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel22) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel23) .addContainerGap())); jPanel13.setBorder(BorderFactory.createEtchedBorder()); jLabel8.setText("Total Cache File Size"); btnOpenOtherCacheFolder.setIcon(new ImageIcon(getClass().getResource("/icons/folder_open.png"))); // NOI18N btnOpenOtherCacheFolder.setText("Open Dir"); btnOpenOtherCacheFolder.setHorizontalTextPosition(SwingConstants.CENTER); btnOpenOtherCacheFolder.setVerticalTextPosition(SwingConstants.BOTTOM); btnOpenOtherCacheFolder.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnOpenOtherCacheFolderActionPerformed(evt); } }); btnDeleteCache.setIcon(new ImageIcon(getClass().getResource("/icons/cross2.png"))); // NOI18N btnDeleteCache.setText("Delete Cache"); btnDeleteCache.setHorizontalTextPosition(SwingConstants.CENTER); btnDeleteCache.setVerticalTextPosition(SwingConstants.BOTTOM); btnDeleteCache.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnDeleteCacheActionPerformed(evt); } }); jLabel9.setText("Total Cache File"); txtTotalFileSize1.setEditable(false); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${cacheFile.fileListSize}"), txtTotalFileSize1, org.jdesktop.beansbinding.BeanProperty.create("text")); bindingGroup.addBinding(binding); txtTotalFileSize.setEditable(false); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${cacheFile.totalFolderSize}"), txtTotalFileSize, org.jdesktop.beansbinding.BeanProperty.create("text")); bindingGroup.addBinding(binding); GroupLayout jPanel13Layout = new GroupLayout(jPanel13); jPanel13.setLayout(jPanel13Layout); jPanel13Layout.setHorizontalGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel13Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(jLabel8).addComponent(jLabel9).addComponent(btnDeleteCache)) .addGap(18, 18, 18) .addGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.TRAILING, false) .addComponent(txtTotalFileSize1, GroupLayout.Alignment.LEADING) .addComponent(btnOpenOtherCacheFolder, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 103, Short.MAX_VALUE) .addComponent(txtTotalFileSize)) .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel13Layout.setVerticalGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel13Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(jLabel8).addComponent(txtTotalFileSize, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(jLabel9).addComponent(txtTotalFileSize1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false) .addComponent(btnDeleteCache, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnOpenOtherCacheFolder)) .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); GroupLayout jPanel7Layout = new GroupLayout(jPanel7); jPanel7.setLayout(jPanel7Layout); jPanel7Layout.setHorizontalGroup(jPanel7Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup().addContainerGap() .addComponent(jPanel13, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jPanel9, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addContainerGap(443, Short.MAX_VALUE))); jPanel7Layout.setVerticalGroup(jPanel7Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel7Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false) .addComponent(jPanel9, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel13, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(289, Short.MAX_VALUE))); jTabbedPane1.addTab("Cache Info", jPanel7); jPanel5.setBorder(BorderFactory.createEtchedBorder()); txtTotalLogSize.setEditable(false); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${logFile.totalFolderSize}"), txtTotalLogSize, org.jdesktop.beansbinding.BeanProperty.create("text")); bindingGroup.addBinding(binding); jLabel11.setText("Total File on Log Folder"); txtTotalLog.setEditable(false); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${logFile.fileListSize}"), txtTotalLog, org.jdesktop.beansbinding.BeanProperty.create("text")); bindingGroup.addBinding(binding); btnCleanLog.setIcon(new ImageIcon(getClass().getResource("/icons/cross2.png"))); // NOI18N btnCleanLog.setText("Clean Log File"); btnCleanLog.setHorizontalTextPosition(SwingConstants.CENTER); btnCleanLog.setVerticalTextPosition(SwingConstants.BOTTOM); btnCleanLog.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCleanLogActionPerformed(evt); } }); jLabel13.setText("Total Size on Log Folder "); GroupLayout jPanel5Layout = new GroupLayout(jPanel5); jPanel5.setLayout(jPanel5Layout); jPanel5Layout.setHorizontalGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.TRAILING, false) .addComponent(btnCleanLog, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel5Layout.createSequentialGroup() .addGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(jLabel13).addComponent(jLabel11)) .addGap(18, 18, 18) .addGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(txtTotalLog, GroupLayout.PREFERRED_SIZE, 66, GroupLayout.PREFERRED_SIZE) .addComponent(txtTotalLogSize, GroupLayout.PREFERRED_SIZE, 123, GroupLayout.PREFERRED_SIZE)))) .addContainerGap(22, Short.MAX_VALUE))); jPanel5Layout.setVerticalGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(txtTotalLog, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(jLabel11)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(jLabel13).addComponent(txtTotalLogSize, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnCleanLog, GroupLayout.PREFERRED_SIZE, 50, GroupLayout.PREFERRED_SIZE) .addContainerGap())); jPanel6.setBorder(BorderFactory.createEtchedBorder()); jLabel12.setText("Log File Data :"); txtLogContent.setEditable(false); txtLogContent.setColumns(20); txtLogContent.setLineWrap(true); txtLogContent.setRows(5); txtLogContent.setWrapStyleWord(true); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${logFileData}"), txtLogContent, org.jdesktop.beansbinding.BeanProperty.create("text")); bindingGroup.addBinding(binding); jScrollPane1.setViewportView(txtLogContent); GroupLayout jPanel6Layout = new GroupLayout(jPanel6); jPanel6.setLayout(jPanel6Layout); jPanel6Layout.setHorizontalGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel6Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, GroupLayout.DEFAULT_SIZE, 724, Short.MAX_VALUE) .addGroup(jPanel6Layout.createSequentialGroup().addComponent(jLabel12).addGap(0, 0, Short.MAX_VALUE))) .addContainerGap())); jPanel6Layout .setVerticalGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel6Layout.createSequentialGroup().addContainerGap().addComponent(jLabel12) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jScrollPane1, GroupLayout.PREFERRED_SIZE, 339, GroupLayout.PREFERRED_SIZE) .addContainerGap())); jPanel8.setBackground(Color.white); jPanel8.setBorder(BorderFactory.createEtchedBorder()); jLabel17.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N jLabel17.setText("application use it as a log tracker."); jLabel16.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N jLabel16.setText("These 2 log files cannot be delete, because the"); jLabel15.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N jLabel15.setText("Minimal log files is 2 files."); jLabel14.setFont(new Font("Liberation Sans", 1, 12)); // NOI18N jLabel14.setText("Info :"); GroupLayout jPanel8Layout = new GroupLayout(jPanel8); jPanel8.setLayout(jPanel8Layout); jPanel8Layout.setHorizontalGroup(jPanel8Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel8Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel8Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(jLabel14).addComponent(jLabel15).addComponent(jLabel16) .addComponent(jLabel17)) .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel8Layout.setVerticalGroup(jPanel8Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel8Layout.createSequentialGroup().addContainerGap().addComponent(jLabel14) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel15) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel16) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel17) .addContainerGap())); GroupLayout jPanel3Layout = new GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup(jPanel3Layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup( GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel3Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false) .addComponent(jPanel5, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel8, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jPanel6, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap())); jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup().addGap(20, 20, 20) .addGroup(jPanel3Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(jPanel6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addGroup(jPanel3Layout.createSequentialGroup() .addComponent(jPanel5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel8, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))) .addContainerGap(41, Short.MAX_VALUE))); jTabbedPane1.addTab("Log Monitor", jPanel3); jPanel15.setBorder(BorderFactory.createEtchedBorder()); txtAppLookAndFeel.setEditable(false); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${defaultLookAndFeel}"), txtAppLookAndFeel, org.jdesktop.beansbinding.BeanProperty.create("text")); bindingGroup.addBinding(binding); jLabel10.setText("Look And Feel "); btnSaveLF.setIcon(new ImageIcon(getClass().getResource("/icons/edit.png"))); // NOI18N btnSaveLF.setText("Save"); btnSaveLF.setHorizontalTextPosition(SwingConstants.CENTER); btnSaveLF.setVerticalTextPosition(SwingConstants.BOTTOM); btnSaveLF.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSaveLFActionPerformed(evt); } }); btnSelectLF.setText("Change Look and Feel"); btnSelectLF.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSelectLFActionPerformed(evt); } }); GroupLayout jPanel15Layout = new GroupLayout(jPanel15); jPanel15.setLayout(jPanel15Layout); jPanel15Layout.setHorizontalGroup(jPanel15Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel15Layout.createSequentialGroup().addContainerGap().addComponent(jLabel10) .addGap(4, 4, 4) .addGroup(jPanel15Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(btnSaveLF, GroupLayout.PREFERRED_SIZE, 90, GroupLayout.PREFERRED_SIZE) .addComponent(txtAppLookAndFeel, GroupLayout.PREFERRED_SIZE, 395, GroupLayout.PREFERRED_SIZE) .addComponent(btnSelectLF, GroupLayout.PREFERRED_SIZE, 176, GroupLayout.PREFERRED_SIZE)) .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel15Layout.setVerticalGroup(jPanel15Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel15Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel15Layout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(jLabel10).addComponent(txtAppLookAndFeel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(btnSelectLF) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(btnSaveLF) .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel16.setBackground(Color.white); jPanel16.setBorder(BorderFactory.createEtchedBorder()); jLabel41.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N jLabel41.setText("to be restarted."); jLabel36.setFont(new Font("Liberation Sans", 1, 12)); // NOI18N jLabel36.setText("Info :"); jLabel40.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N jLabel40.setText("System. Changing Look and Feel requires application"); jLabel37.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N jLabel37.setText("Changing the Look and Feel means changing this"); jLabel38.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N jLabel38.setText("application theme, the theme provided by it's installed"); jLabel39.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N jLabel39.setText("Look and Feel class in the Java Runtime Environment"); GroupLayout jPanel16Layout = new GroupLayout(jPanel16); jPanel16.setLayout(jPanel16Layout); jPanel16Layout.setHorizontalGroup(jPanel16Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel16Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel16Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(jLabel36).addComponent(jLabel37).addComponent(jLabel38) .addComponent(jLabel39).addComponent(jLabel40).addComponent(jLabel41)) .addContainerGap())); jPanel16Layout.setVerticalGroup(jPanel16Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel16Layout.createSequentialGroup().addContainerGap().addComponent(jLabel36) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel37) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel38) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel39) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel40) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel41) .addContainerGap())); GroupLayout jPanel4Layout = new GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout .setHorizontalGroup( jPanel4Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup().addContainerGap() .addComponent(jPanel15, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel16, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addContainerGap(261, Short.MAX_VALUE))); jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel4Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false) .addComponent(jPanel16, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel15, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(289, Short.MAX_VALUE))); jTabbedPane1.addTab("Look And Feel", jPanel4); jLabel5.setFont(new Font("DejaVu Sans", 1, 18)); // NOI18N jLabel5.setHorizontalAlignment(SwingConstants.CENTER); jLabel5.setText("System Configuration"); GroupLayout layout = new GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addComponent(jTabbedPane1).addComponent(jLabel5, GroupLayout.Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING) .addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addComponent(jLabel5) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jTabbedPane1))); bindingGroup.bind(); }