List of usage examples for javax.swing.border TitledBorder TOP
int TOP
To view the source code for javax.swing.border TitledBorder TOP.
Click Source Link
From source file:es.ubu.XRayDetector.interfaz.PanelAplicacion.java
/** * Gets the results table panel.//from ww w .j a va 2 s .c o m */ public void getPanelTabla() { panelTabla_1 = new JPanel(); panelTabla_1.setBorder( new TitledBorder(null, "Tabla de resultados", TitledBorder.LEADING, TitledBorder.TOP, null, null)); panelTabla_1.setBounds(282, 572, 750, 173); frmXraydetector.getContentPane().add(panelTabla_1); }
From source file:org.fhaes.fhsamplesize.view.FHSampleSize.java
/** * Initialize GUI components.//from w w w . jav a 2 s . com */ @SuppressWarnings({ "rawtypes", "unchecked" }) private void initGUI() { App.init(); // setBounds(100, 100, 972, 439); setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); setIconImage(Builder.getApplicationIcon()); setTitle("Sample Size Analysis"); getContentPane().setLayout(new MigLayout("", "[1136px,grow,fill]", "[30px][405px,grow]")); JToolBar toolBar = new JToolBar(); toolBar.setFloatable(false); getContentPane().add(toolBar, "cell 0 0,growx,aligny top"); JToolBarButton btnOpen = new JToolBarButton(actionBrowse); btnOpen.setIcon(Builder.getImageIcon("fileopen.png")); toolBar.add(btnOpen); JToolBarButton btnSave = new JToolBarButton(actionSaveTable); btnSave.setIcon(Builder.getImageIcon("save.png")); toolBar.add(btnSave); JToolBarButton btnExportPDF = new JToolBarButton(actionExportPDF); btnExportPDF.setIcon(Builder.getImageIcon("pdf.png")); toolBar.add(btnExportPDF); JToolBarButton btnExportPNG = new JToolBarButton(actionExportPNG); btnExportPNG.setIcon(Builder.getImageIcon("formatpng.png")); toolBar.add(btnExportPNG); toolBar.addSeparator(); JToolBarButton btnRun = new JToolBarButton(actionRun); btnRun.setIcon(Builder.getImageIcon("run.png")); toolBar.add(btnRun); JPanel panelMain = new JPanel(); getContentPane().add(panelMain, "cell 0 1,grow"); panelMain.setLayout(new BorderLayout(0, 0)); JSplitPane splitPaneMain = new JSplitPane(); splitPaneMain.setOneTouchExpandable(true); panelMain.add(splitPaneMain); JPanel panelParameters = new JPanel(); splitPaneMain.setLeftComponent(panelParameters); panelParameters.setLayout(new MigLayout("", "[grow,right]", "[][][][193.00,grow,fill][]")); JPanel panelInput = new JPanel(); panelInput.setBorder(new TitledBorder(null, "Input", TitledBorder.LEADING, TitledBorder.TOP, null, null)); panelParameters.add(panelInput, "cell 0 0,grow"); panelInput.setLayout(new MigLayout("", "[100px:100px:180px,right][grow,fill][]", "[]")); JLabel lblInputFile = new JLabel("Input file:"); panelInput.add(lblInputFile, "cell 0 0"); txtInputFile = new JTextField(); panelInput.add(txtInputFile, "cell 1 0,growx"); txtInputFile.setActionCommand("NewFileTyped"); txtInputFile.addActionListener(this); txtInputFile.setColumns(10); JButton btnBrowse = new JButton(""); panelInput.add(btnBrowse, "cell 2 0"); btnBrowse.setAction(actionBrowse); btnBrowse.setText(""); btnBrowse.setIcon(Builder.getImageIcon("fileopen16.png")); btnBrowse.setPreferredSize(new Dimension(25, 25)); btnBrowse.setMaximumSize(new Dimension(25, 25)); btnBrowse.putClientProperty("JButton.buttonType", "segmentedTextured"); btnBrowse.putClientProperty("JButton.segmentPosition", "middle"); JPanel panelAnalysisOptions = new JPanel(); panelAnalysisOptions.setBorder(new TitledBorder(null, "Analysis and filtering options", TitledBorder.LEADING, TitledBorder.TOP, null, null)); panelParameters.add(panelAnalysisOptions, "cell 0 1,grow"); panelAnalysisOptions.setLayout(new MigLayout("", "[100px:100px:180px,right][grow][][]", "[][][][][]")); JLabel lblEventTypes = new JLabel("Event type:"); panelAnalysisOptions.add(lblEventTypes, "cell 0 0"); cboEventType = new JComboBox(); panelAnalysisOptions.add(cboEventType, "cell 1 0 3 1"); cboEventType.setModel(new DefaultComboBoxModel(EventTypeToProcess.values())); new EventTypeWrapper(cboEventType, PrefKey.EVENT_TYPE_TO_PROCESS, EventTypeToProcess.FIRE_EVENT); chkCommonYears = new JCheckBox("<html>Only analyze years all series have in common"); chkCommonYears.setEnabled(false); new CheckBoxWrapper(chkCommonYears, PrefKey.SSIZ_CHK_COMMON_YEARS, false); panelAnalysisOptions.add(chkCommonYears, "cell 1 1 3 1"); chkExcludeSeriesWithNoEvents = new JCheckBox("<html>Exclude series/segments with no events"); chkExcludeSeriesWithNoEvents.setEnabled(false); new CheckBoxWrapper(chkExcludeSeriesWithNoEvents, PrefKey.SSIZ_CHK_EXCLUDE_SERIES_WITH_NO_EVENTS, false); panelAnalysisOptions.add(chkExcludeSeriesWithNoEvents, "cell 1 2 3 1"); JLabel lblThresholdType = new JLabel("Threshold:"); panelAnalysisOptions.add(lblThresholdType, "cell 0 3"); cboThresholdType = new JComboBox(); panelAnalysisOptions.add(cboThresholdType, "cell 1 3"); cboThresholdType.setModel(new DefaultComboBoxModel(FireFilterType.values())); new FireFilterTypeWrapper(cboThresholdType, PrefKey.COMPOSITE_FILTER_TYPE_WITH_ALL_TREES, FireFilterType.NUMBER_OF_EVENTS); JLabel label = new JLabel(">="); panelAnalysisOptions.add(label, "flowx,cell 2 3"); spnThresholdValueGT = new JSpinner(); panelAnalysisOptions.add(spnThresholdValueGT, "cell 3 3"); spnThresholdValueGT.setModel(new SpinnerNumberModel(1, 1, 999, 1)); new SpinnerWrapper(spnThresholdValueGT, PrefKey.COMPOSITE_FILTER_VALUE, 1); chkEnableLessThan = new JCheckBox(""); chkEnableLessThan.setActionCommand("LessThanThresholdStatus"); chkEnableLessThan.addActionListener(this); panelAnalysisOptions.add(chkEnableLessThan, "flowx,cell 1 4,alignx right"); lblLessThan = new JLabel("<="); lblLessThan.setEnabled(false); panelAnalysisOptions.add(lblLessThan, "cell 2 4"); spnThresholdValueLT = new JSpinner(); spnThresholdValueLT.setEnabled(false); spnThresholdValueLT.setModel(new SpinnerNumberModel(1, 1, 999, 1)); panelAnalysisOptions.add(spnThresholdValueLT, "cell 3 4"); lblAnd = new JLabel("and"); panelAnalysisOptions.add(lblAnd, "cell 1 4"); JPanel panelSimulations = new JPanel(); panelSimulations.setBorder( new TitledBorder(null, "Simulations", TitledBorder.LEADING, TitledBorder.TOP, null, null)); panelParameters.add(panelSimulations, "cell 0 2,grow"); panelSimulations.setLayout(new MigLayout("", "[100px:100px:180px,right][fill]", "[][][]")); JLabel lblSimulations = new JLabel("Simulations:"); panelSimulations.add(lblSimulations, "cell 0 0"); spnSimulations = new JSpinner(); panelSimulations.add(spnSimulations, "cell 1 0"); spnSimulations.setModel(new SpinnerNumberModel(new Integer(1000), new Integer(1), null, new Integer(1))); new SpinnerWrapper(spnSimulations, PrefKey.SSIZ_SIMULATION_COUNT, 1000); JLabel lblSeedNumber = new JLabel("Seed number:"); panelSimulations.add(lblSeedNumber, "cell 0 1"); spnSeed = new JSpinner(); panelSimulations.add(spnSeed, "cell 1 1"); spnSeed.setModel(new SpinnerNumberModel(new Integer(30188), null, null, new Integer(1))); new SpinnerWrapper(spnSeed, PrefKey.SSIZ_SEED_NUMBER, 30188); JLabel lblResampling = new JLabel("Resampling:"); panelSimulations.add(lblResampling, "cell 0 2"); cboResampling = new JComboBox(); panelSimulations.add(cboResampling, "cell 1 2"); cboResampling .setModel(new DefaultComboBoxModel(new String[] { "With replacement", "Without replacement" })); new ResamplingTypeWrapper(cboResampling, PrefKey.SSIZ_RESAMPLING_TYPE, ResamplingType.WITH_REPLACEMENT); segmentationPanel = new SegmentationPanel(); segmentationPanel.chkSegmentation.setText("Process subset or segments of dataset?"); segmentationPanel.chkSegmentation.setEnabled(false); panelParameters.add(segmentationPanel, "cell 0 3,growx"); JPanel panel_3 = new JPanel(); panelParameters.add(panel_3, "cell 0 4,grow"); panel_3.setLayout(new MigLayout("", "[left][grow][right]", "[]")); JButton btnReset = new JButton("Reset"); btnReset.setActionCommand("Reset"); btnReset.addActionListener(this); panel_3.add(btnReset, "cell 0 0,grow"); JButton btnRunAnalysis = new JButton("Run Analysis"); btnRunAnalysis.setAction(actionRun); panel_3.add(btnRunAnalysis, "cell 2 0,grow"); JPanel panelResults = new JPanel(); splitPaneMain.setRightComponent(panelResults); panelResults.setLayout(new BorderLayout(0, 0)); splitPaneResults = new JSplitPane(); splitPaneResults.setResizeWeight(0.5); splitPaneResults.setOneTouchExpandable(true); splitPaneResults.setDividerLocation(0.5d); panelResults.add(splitPaneResults, BorderLayout.CENTER); splitPaneResults.setOrientation(JSplitPane.VERTICAL_SPLIT); JPanel panelResultsTop = new JPanel(); splitPaneResults.setLeftComponent(panelResultsTop); panelResultsTop.setLayout(new BorderLayout(0, 0)); JPanel panelChartOptions = new JPanel(); panelChartOptions.setBackground(Color.WHITE); panelResultsTop.add(panelChartOptions, BorderLayout.SOUTH); panelChartOptions.setLayout(new MigLayout("", "[][][][][][grow][grow]", "[15px,center]")); JLabel lblNewLabel = new JLabel("Plot:"); panelChartOptions.add(lblNewLabel, "cell 0 0,alignx trailing,aligny center"); cboChartMetric = new JComboBox(); cboChartMetric.setEnabled(false); cboChartMetric.setModel(new DefaultComboBoxModel(MiddleMetric.values())); panelChartOptions.add(cboChartMetric, "cell 1 0,growx"); cboChartMetric.setBackground(Color.WHITE); JLabel lblOfSegment = new JLabel("of segment:"); panelChartOptions.add(lblOfSegment, "cell 2 0,alignx trailing"); cboSegment = new JComboBox(); cboSegment.setBackground(Color.WHITE); cboSegment.setActionCommand("UpdateChart"); cboSegment.addActionListener(this); panelChartOptions.add(cboSegment, "cell 3 0,growx"); cboChartMetric.setActionCommand("UpdateChart"); JLabel lblWithAsymptoteType = new JLabel("with asymptote type:"); panelChartOptions.add(lblWithAsymptoteType, "cell 4 0,alignx trailing"); JComboBox comboBox = new JComboBox(); comboBox.setEnabled(false); comboBox.setModel(new DefaultComboBoxModel(new String[] { "none", "Weibull", "Michaelis-Menten", "Modified Michaelis-Menten", "Logistic", "Modified exponential" })); comboBox.setBackground(Color.WHITE); panelChartOptions.add(comboBox, "cell 5 0,growx"); cboChartMetric.addActionListener(this); panelChart = new JPanel(); panelChart.setMinimumSize(new Dimension(200, 200)); panelResultsTop.add(panelChart, BorderLayout.CENTER); panelChart.setLayout(new BorderLayout(0, 0)); panelChart.setBackground(Color.WHITE); JTabbedPane panelResultsBottom = new JTabbedPane(JTabbedPane.BOTTOM); splitPaneResults.setRightComponent(panelResultsBottom); simulationsTable = new SSIZResultsTable(); simulationsTable.setEnabled(false); simulationsTable.addMouseListener(new TablePopClickListener()); simulationsTable.setVisibleRowCount(10); adapter = new JTableSpreadsheetByRowAdapter(simulationsTable); scrollPaneSimulations = new JScrollPane(); panelResultsBottom.addTab("Simulations", null, scrollPaneSimulations, null); scrollPaneSimulations.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); scrollPaneSimulations.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPaneSimulations.setViewportView(simulationsTable); JPanel panelAsymptote = new JPanel(); asymptoteTable = new AsymptoteTable(); asymptoteTable.setEnabled(false); // asymptoteTable.addMouseListener(new TablePopClickListener()); asymptoteTable.setVisibleRowCount(10); scrollPaneAsymptote = new JScrollPane(); scrollPaneAsymptote.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); scrollPaneAsymptote.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPaneAsymptote.setViewportView(asymptoteTable); panelAsymptote.setLayout(new BorderLayout()); panelAsymptote.add(scrollPaneAsymptote, BorderLayout.CENTER); panelResultsBottom.addTab("Asymptote", null, panelAsymptote, null); // Disable asymptote tab until it is implemented panelResultsBottom.setEnabledAt(1, false); panelProgressBar = new JPanel(); panelProgressBar.setLayout(new BorderLayout()); btnCancelAnalysis = new JButton("Cancel"); btnCancelAnalysis.setIcon(Builder.getImageIcon("delete.png")); btnCancelAnalysis.setVisible(false); btnCancelAnalysis.setActionCommand("CancelAnalysis"); btnCancelAnalysis.addActionListener(this); progressBar = new JProgressBar(); panelProgressBar.add(progressBar, BorderLayout.CENTER); panelProgressBar.add(btnCancelAnalysis, BorderLayout.EAST); progressBar.setStringPainted(true); fileDialogWasUsed = false; mouseListenersActive = false; this.setGUIForFHFileReader(); this.setGUIForThresholdStatus(); pack(); this.setExtendedState(this.getExtendedState() | JFrame.MAXIMIZED_BOTH); setVisible(true); }
From source file:de.adv_online.aaa.profiltool.ProfilDialog.java
private Component createMainTab() { String s;/*from w w w .j a va 2 s. c om*/ String appSchemaStr; s = options.parameter("appSchemaName"); if (s != null && s.trim().length() > 0) appSchemaStr = s.trim(); else appSchemaStr = ""; String mart; s = options.parameter(paramProfilClass, "Modellart"); if (s != null && s.trim().length() > 0) mart = s.trim(); else mart = ""; String profil; s = options.parameter(paramProfilClass, "Profil"); if (s != null && s.trim().length() > 0) profil = s.trim(); else profil = ""; String quelle; s = options.parameter(paramProfilClass, "Quelle"); if (s != null && s.trim().length() > 0) quelle = s.trim(); else quelle = "Neu_Minimal"; String ziel; s = options.parameter(paramProfilClass, "Ziel"); if (s != null && s.trim().length() > 0) ziel = s.trim(); else ziel = "Datei"; String pfadStr; s = options.parameter(paramProfilClass, "Verzeichnis"); if (s == null || s.trim().length() == 0) pfadStr = ""; else { File f = new File(s.trim()); if (f.exists()) pfadStr = f.getAbsolutePath(); else pfadStr = ""; } String mdlDirStr = eap; final JPanel topPanel = new JPanel(); final JPanel topInnerPanel = new JPanel(new FlowLayout(FlowLayout.LEADING, 30, 5)); topPanel.setLayout(new BoxLayout(topPanel, BoxLayout.X_AXIS)); topPanel.setBorder(BorderFactory.createEmptyBorder(15, 20, 15, 10)); // Anwendungsschema appSchemaField = new JTextField(35); appSchemaField.setText(appSchemaStr); appSchemaFieldLabel = new JLabel("Name des zu prozessierenden Anwendungsschemas:"); Box asBox = Box.createVerticalBox(); asBox.add(appSchemaFieldLabel); asBox.add(appSchemaField); modellartField = new JTextField(10); modellartField.setText(mart); modellartFieldLabel = new JLabel("Modellart:"); asBox.add(modellartFieldLabel); asBox.add(modellartField); profilField = new JTextField(10); profilField.setText(profil); profilFieldLabel = new JLabel("Profilkennung:"); asBox.add(profilFieldLabel); asBox.add(profilField); topInnerPanel.add(asBox); topPanel.add(topInnerPanel); // Quelle Box quelleBox = Box.createVerticalBox(); final JPanel quellePanel = new JPanel(new GridLayout(4, 1)); quelleGroup = new ButtonGroup(); rbq3ap = new JRadioButton("3ap-Datei"); quellePanel.add(rbq3ap); if (quelle.equals("Datei")) rbq3ap.setSelected(true); rbq3ap.setActionCommand("Datei"); quelleGroup.add(rbq3ap); rbqtv = new JRadioButton("'AAA:Profile' Tagged Values in Modell"); quellePanel.add(rbqtv); if (quelle.equals("Modell")) rbqtv.setSelected(true); rbqtv.setActionCommand("Modell"); quelleGroup.add(rbqtv); rbqmin = new JRadioButton("Neues Minimalprofil erzeugen"); quellePanel.add(rbqmin); if (quelle.equals("Neu_Minimal")) rbqmin.setSelected(true); rbqmin.setActionCommand("Neu_Minimal"); quelleGroup.add(rbqmin); rbqmax = new JRadioButton("Neues Maximalprofil erzeugen"); quellePanel.add(rbqmax); if (quelle.equals("Neu_Maximal")) rbqmax.setSelected(true); rbqmax.setActionCommand("Neu_Maximal"); quelleGroup.add(rbqmax); quelleBorder = new TitledBorder(new LineBorder(Color.black), "Quelle der Profildefinition", TitledBorder.LEFT, TitledBorder.TOP); quellePanel.setBorder(quelleBorder); quelleBox.add(quellePanel); Box zielBox = Box.createVerticalBox(); final JPanel zielPanel = new JPanel(new GridLayout(4, 1)); zielGroup = new ButtonGroup(); rbz3ap = new JRadioButton("3ap-Datei"); zielPanel.add(rbz3ap); if (ziel.equals("Datei")) rbz3ap.setSelected(true); rbz3ap.setActionCommand("Datei"); zielGroup.add(rbz3ap); rbztv = new JRadioButton("'AAA:Profile' Tagged Values in Modell"); zielPanel.add(rbztv); if (ziel.equals("Modell")) rbztv.setSelected(true); rbztv.setActionCommand("Modell"); zielGroup.add(rbztv); rbzbeide = new JRadioButton("Beides"); zielPanel.add(rbzbeide); if (ziel.equals("DateiModell")) rbzbeide.setSelected(true); rbzbeide.setActionCommand("DateiModell"); zielGroup.add(rbzbeide); rbzdel = new JRadioButton("Profilkennung wird aus Modell entfernt"); zielPanel.add(rbzdel); if (ziel.equals("Ohne")) rbzdel.setSelected(true); rbzdel.setActionCommand("Ohne"); zielGroup.add(rbzdel); zielBorder = new TitledBorder(new LineBorder(Color.black), "Ziel der Profildefinition", TitledBorder.LEFT, TitledBorder.TOP); zielPanel.setBorder(zielBorder); zielBox.add(zielPanel); // Pfadangaben Box pfadBox = Box.createVerticalBox(); final JPanel pfadInnerPanel = new JPanel(); Box skBox = Box.createVerticalBox(); pfadFieldLabel = new JLabel("Pfad in dem 3ap-Dateien liegen/geschrieben werden:"); skBox.add(pfadFieldLabel); pfadField = new JTextField(40); pfadField.setText(pfadStr); skBox.add(pfadField); mdlDirFieldLabel = new JLabel("Pfad zum Modell:"); skBox.add(mdlDirFieldLabel); mdlDirField = new JTextField(40); mdlDirField.setText(mdlDirStr); skBox.add(mdlDirField); pfadInnerPanel.add(skBox); pfadBox.add(pfadInnerPanel); final JPanel pfadPanel = new JPanel(); pfadPanel.add(pfadBox); pfadPanel.setBorder( new TitledBorder(new LineBorder(Color.black), "Pfadangaben", TitledBorder.LEFT, TitledBorder.TOP)); // Zusammenstellung Box fileBox = Box.createVerticalBox(); fileBox.add(topPanel); fileBox.add(quellePanel); fileBox.add(zielPanel); fileBox.add(pfadPanel); JPanel panel = new JPanel(new BorderLayout()); panel.add(fileBox, BorderLayout.NORTH); if (profil.isEmpty()) { setModellartOnly = true; disableProfileElements(); } // Listen for changes in the profilkennung profilField.getDocument().addDocumentListener(new DocumentListener() { public void changedUpdate(DocumentEvent e) { upd(); } public void removeUpdate(DocumentEvent e) { upd(); } public void insertUpdate(DocumentEvent e) { upd(); } public void upd() { if (!setModellartOnly && profilField.getText().isEmpty()) { setModellartOnly = true; disableProfileElements(); } else if (setModellartOnly && !profilField.getText().isEmpty()) { setModellartOnly = false; enableProfileElements(); } } }); return panel; }
From source file:com.mgmtp.perfload.loadprofiles.ui.AppFrame.java
/** * Creates the frame.// w w w .j a v a 2 s . c o m * * @param configController * the config controller * @param loadProfilesController * the load profiles controller */ @Inject public AppFrame(final ConfigController configController, final LoadProfilesController loadProfilesController, @AppVersion final String appVersion) { this.loadProfilesController = loadProfilesController; this.configController = configController; this.appVersion = appVersion; ThisWindowListener windowAdapter = new ThisWindowListener(); addWindowStateListener(windowAdapter); addWindowListener(windowAdapter); addComponentListener(new ThisComponentListener()); initComponents(); initModels(); cardLayout.show(pnlCard, "none"); { chartPanel = new ChartPanel((JFreeChart) null); contentPane.add(chartPanel, "cell 0 2 2 1,grow"); chartPanel.setBorder(new CompoundBorder( new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Load Profiles", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)), new CompoundBorder(new EmptyBorder(4, 4, 4, 4), new EtchedBorder(EtchedBorder.LOWERED, null, null)))); chartPanel.setName("chartPanel"); chartPanel.setPopupMenu(null); } String fileName = configController.getAppProperties().getProperty("lpConfig.file"); if (fileName != null) { loadProfileConfigFile = new File(fileName); } fileName = configController.getAppProperties().getProperty("lpEvents.file"); if (fileName != null) { loadProfileEventsFile = new File(fileName); } }
From source file:de.dmarcini.submatix.pclogger.gui.ProgramProperetysDialog.java
/** * Initialisiere das Fenster Project: SubmatixBTForPC Package: de.dmarcini.submatix.pclogger.gui * //from w w w. j a v a 2 s . c o m * @author Dirk Marciniak (dirk_marciniak@arcor.de) Stand: 03.08.2012 */ private void initDialog() { setResizable(false); setIconImage(Toolkit.getDefaultToolkit().getImage( ProgramProperetysDialog.class.getResource("/de/dmarcini/submatix/pclogger/res/search.png"))); // setVisible( true ); setBounds(100, 100, 750, 417); getContentPane().setLayout(new BorderLayout()); contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); getContentPane().add(contentPanel, BorderLayout.SOUTH); { btnCancel = new JButton(LangStrings.getString("ProgramProperetysDialog.btnCancel.text")); //$NON-NLS-1$ btnCancel.setIcon(new ImageIcon( ProgramProperetysDialog.class.getResource("/de/dmarcini/submatix/pclogger/res/114.png"))); btnCancel.setHorizontalAlignment(SwingConstants.LEFT); btnCancel.setIconTextGap(15); btnCancel.setPreferredSize(new Dimension(180, 40)); btnCancel.setMaximumSize(new Dimension(160, 40)); btnCancel.setMargin(new Insets(6, 30, 6, 30)); btnCancel.setForeground(Color.RED); btnCancel.setBackground(new Color(255, 192, 203)); btnCancel.setActionCommand("cancel"); btnCancel.addActionListener(this); btnCancel.addMouseMotionListener(this); } { btnOk = new JButton(LangStrings.getString("ProgramProperetysDialog.btnOk.text")); //$NON-NLS-1$ btnOk.setIconTextGap(15); btnOk.setHorizontalAlignment(SwingConstants.LEFT); btnOk.setIcon(new ImageIcon( ProgramProperetysDialog.class.getResource("/de/dmarcini/submatix/pclogger/res/31.png"))); btnOk.setPreferredSize(new Dimension(180, 40)); btnOk.setMaximumSize(new Dimension(160, 40)); btnOk.setMargin(new Insets(6, 30, 6, 30)); btnOk.setForeground(new Color(0, 100, 0)); btnOk.setBackground(new Color(152, 251, 152)); btnOk.setActionCommand("set_propertys"); btnOk.addActionListener(this); btnOk.addMouseMotionListener(this); } unitsPanel = new JPanel(); unitsPanel.setBorder(new TitledBorder(new LineBorder(new Color(0, 0, 0)), " UNITS ", TitledBorder.LEADING, TitledBorder.TOP, null, null)); pahtsPanel = new JPanel(); pahtsPanel.setBorder(new TitledBorder(new LineBorder(new Color(0, 0, 0)), " DIRECTORYS ", TitledBorder.LEADING, TitledBorder.TOP, null, null)); GroupLayout gl_contentPanel = new GroupLayout(contentPanel); gl_contentPanel.setHorizontalGroup(gl_contentPanel.createParallelGroup(Alignment.TRAILING).addGroup( Alignment.LEADING, gl_contentPanel.createSequentialGroup().addContainerGap().addGroup(gl_contentPanel .createParallelGroup(Alignment.LEADING) .addComponent(pahtsPanel, GroupLayout.PREFERRED_SIZE, 714, GroupLayout.PREFERRED_SIZE) .addGroup(gl_contentPanel.createSequentialGroup() .addComponent(btnCancel, GroupLayout.PREFERRED_SIZE, 160, GroupLayout.PREFERRED_SIZE) .addPreferredGap(ComponentPlacement.RELATED, 394, Short.MAX_VALUE) .addComponent(btnOk, GroupLayout.PREFERRED_SIZE, 160, GroupLayout.PREFERRED_SIZE)) .addComponent(unitsPanel, GroupLayout.DEFAULT_SIZE, 714, Short.MAX_VALUE)) .addContainerGap())); gl_contentPanel.setVerticalGroup(gl_contentPanel.createParallelGroup(Alignment.TRAILING) .addGroup(gl_contentPanel.createSequentialGroup() .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(pahtsPanel, GroupLayout.PREFERRED_SIZE, 225, GroupLayout.PREFERRED_SIZE) .addPreferredGap(ComponentPlacement.UNRELATED) .addComponent(unitsPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(gl_contentPanel.createParallelGroup(Alignment.BASELINE) .addComponent(btnOk, GroupLayout.PREFERRED_SIZE, 28, GroupLayout.PREFERRED_SIZE) .addComponent(btnCancel, GroupLayout.PREFERRED_SIZE, 28, GroupLayout.PREFERRED_SIZE)))); databaseDirLabel = new JLabel(LangStrings.getString("ProgramProperetysDialog.databaseDirLabel.text")); //$NON-NLS-1$ databaseDirTextField = new JTextField(); databaseDirTextField.setEditable(false); databaseDirTextField.addMouseMotionListener(this); databaseDirTextField.setColumns(10); logfileLabel = new JLabel(LangStrings.getString("ProgramProperetysDialog.logFileLabel.text")); //$NON-NLS-1$ logfileNameTextField = new JTextField(); logfileNameTextField.setEditable(false); logfileNameTextField.addMouseMotionListener(this); logfileNameTextField.setColumns(10); moveDataCheckBox = new JCheckBox(LangStrings.getString("ProgramProperetysDialog.moveDataCheckBox.text")); //$NON-NLS-1$ moveDataCheckBox.addMouseMotionListener(this); databaseDirFileButton = new JButton(""); databaseDirFileButton.setIcon(new ImageIcon( ProgramProperetysDialog.class.getResource("/javax/swing/plaf/metal/icons/ocean/directory.gif"))); databaseDirFileButton.addActionListener(this); databaseDirFileButton.setActionCommand("choose_datadir"); databaseDirFileButton.addMouseMotionListener(this); logfileNameButton = new JButton(""); logfileNameButton.setIcon(new ImageIcon( ProgramProperetysDialog.class.getResource("/javax/swing/plaf/metal/icons/ocean/directory.gif"))); logfileNameButton.addActionListener(this); logfileNameButton.setActionCommand("choose_logfile"); logfileNameButton.addMouseMotionListener(this); exportDirLabel = new JLabel(LangStrings.getString("ProgramProperetysDialog.exportDirLabel.text")); //$NON-NLS-1$ exportDirTextField = new JTextField(); exportDirTextField.setEditable(false); exportDirTextField.setColumns(10); exportDirButton = new JButton(""); exportDirButton.setIcon(new ImageIcon( ProgramProperetysDialog.class.getResource("/javax/swing/plaf/metal/icons/ocean/directory.gif"))); exportDirButton.setActionCommand("choose_exportdir"); exportDirButton.addActionListener(this); exportDirButton.addMouseMotionListener(this); GroupLayout gl_pahtsPanel = new GroupLayout(pahtsPanel); gl_pahtsPanel.setHorizontalGroup(gl_pahtsPanel.createParallelGroup(Alignment.LEADING).addGroup(gl_pahtsPanel .createSequentialGroup().addContainerGap() .addGroup(gl_pahtsPanel.createParallelGroup(Alignment.LEADING) .addGroup(Alignment.TRAILING, gl_pahtsPanel.createSequentialGroup().addGroup(gl_pahtsPanel .createParallelGroup(Alignment.LEADING) .addGroup(gl_pahtsPanel.createSequentialGroup() .addComponent(databaseDirLabel, GroupLayout.DEFAULT_SIZE, 419, Short.MAX_VALUE) .addGap(193)) .addGroup(gl_pahtsPanel.createSequentialGroup() .addComponent(databaseDirTextField, GroupLayout.DEFAULT_SIZE, 606, Short.MAX_VALUE) .addPreferredGap(ComponentPlacement.RELATED))) .addComponent(databaseDirFileButton, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE)) .addComponent(moveDataCheckBox, Alignment.TRAILING) .addGroup(Alignment.TRAILING, gl_pahtsPanel.createSequentialGroup() .addGroup(gl_pahtsPanel.createParallelGroup(Alignment.LEADING) .addGroup(gl_pahtsPanel.createSequentialGroup() .addComponent(logfileLabel, GroupLayout.DEFAULT_SIZE, 345, Short.MAX_VALUE) .addGap(267)) .addGroup(Alignment.TRAILING, gl_pahtsPanel.createSequentialGroup() .addGroup(gl_pahtsPanel.createParallelGroup(Alignment.TRAILING) .addComponent(exportDirLabel, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 606, Short.MAX_VALUE) .addComponent(logfileNameTextField, GroupLayout.DEFAULT_SIZE, 606, Short.MAX_VALUE) .addComponent(exportDirTextField, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 606, Short.MAX_VALUE)) .addPreferredGap(ComponentPlacement.RELATED))) .addGroup(gl_pahtsPanel.createParallelGroup(Alignment.LEADING) .addComponent(logfileNameButton, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE) .addComponent(exportDirButton, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE)))) .addContainerGap())); gl_pahtsPanel.setVerticalGroup(gl_pahtsPanel.createParallelGroup(Alignment.LEADING) .addGroup(gl_pahtsPanel.createSequentialGroup() .addGroup(gl_pahtsPanel.createParallelGroup(Alignment.TRAILING) .addComponent(databaseDirFileButton, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE) .addGroup(gl_pahtsPanel.createSequentialGroup().addComponent(databaseDirLabel) .addPreferredGap(ComponentPlacement.RELATED) .addComponent(databaseDirTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addPreferredGap(ComponentPlacement.RELATED))) .addGap(1).addComponent(moveDataCheckBox).addGap(18) .addGroup(gl_pahtsPanel.createParallelGroup(Alignment.TRAILING) .addComponent(logfileNameButton, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE) .addGroup(gl_pahtsPanel.createSequentialGroup().addComponent(logfileLabel) .addPreferredGap(ComponentPlacement.RELATED) .addComponent(logfileNameTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))) .addGap(18).addComponent(exportDirLabel).addPreferredGap(ComponentPlacement.RELATED) .addGroup(gl_pahtsPanel.createParallelGroup(Alignment.BASELINE) .addComponent(exportDirTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(exportDirButton, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)) .addGap(24))); pahtsPanel.setLayout(gl_pahtsPanel); defaultUnitsRadioButton = new JRadioButton( LangStrings.getString("ProgramPropertysDialog.defaultUnitsRadioButton.text")); //$NON-NLS-1$ defaultUnitsRadioButton.setSelected(true); defaultUnitsRadioButton.setActionCommand("rbutton"); defaultUnitsRadioButton.addActionListener(this); metricUnitsRadioButton = new JRadioButton( LangStrings.getString("ProgramPropertysDialog.metricUnitsRadioButton.text")); //$NON-NLS-1$ metricUnitsRadioButton.setActionCommand("rbutton"); metricUnitsRadioButton.addActionListener(this); imperialUnitsRadioButton = new JRadioButton( LangStrings.getString("ProgramPropertysDialog.imperialUnitsRadioButton.text")); //$NON-NLS-1$ imperialUnitsRadioButton.addActionListener(this); imperialUnitsRadioButton.setActionCommand("rbutton"); defaultUnitsLabel = new JLabel(LangStrings.getString("ProgramProperetysDialog.defaultUnitsLabel.text")); //$NON-NLS-1$ metricUnitsLabel = new JLabel(LangStrings.getString("ProgramProperetysDialog.metricUnitsLabel.text")); //$NON-NLS-1$ imperialUnitsLabel = new JLabel(LangStrings.getString("ProgramProperetysDialog.imperialUnitsLabel.text")); //$NON-NLS-1$ GroupLayout gl_untitsPanel = new GroupLayout(unitsPanel); gl_untitsPanel.setHorizontalGroup(gl_untitsPanel.createParallelGroup(Alignment.LEADING) .addGroup(gl_untitsPanel.createSequentialGroup().addContainerGap() .addGroup(gl_untitsPanel.createParallelGroup(Alignment.LEADING, false) .addComponent(metricUnitsRadioButton, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(imperialUnitsRadioButton, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(defaultUnitsRadioButton, GroupLayout.PREFERRED_SIZE, 132, GroupLayout.PREFERRED_SIZE)) .addGap(18) .addGroup(gl_untitsPanel.createParallelGroup(Alignment.LEADING) .addComponent(metricUnitsLabel, GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE) .addComponent(defaultUnitsLabel, GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE) .addComponent(imperialUnitsLabel, GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)) .addContainerGap())); gl_untitsPanel.setVerticalGroup(gl_untitsPanel.createParallelGroup(Alignment.LEADING) .addGroup(gl_untitsPanel.createSequentialGroup() .addGroup(gl_untitsPanel.createParallelGroup(Alignment.BASELINE) .addComponent(defaultUnitsRadioButton).addComponent(defaultUnitsLabel)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(gl_untitsPanel.createParallelGroup(Alignment.BASELINE) .addComponent(metricUnitsRadioButton).addComponent(metricUnitsLabel)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(gl_untitsPanel.createParallelGroup(Alignment.BASELINE) .addComponent(imperialUnitsRadioButton).addComponent(imperialUnitsLabel)) .addContainerGap(10, Short.MAX_VALUE))); unitsPanel.setLayout(gl_untitsPanel); contentPanel.setLayout(gl_contentPanel); unitsButtonGroup = new ButtonGroup(); unitsButtonGroup.add(defaultUnitsRadioButton); unitsButtonGroup.add(metricUnitsRadioButton); unitsButtonGroup.add(imperialUnitsRadioButton); }
From source file:gov.nih.nci.nbia.StandaloneDMV3.java
private JPanel constructLoginPanel() { JPanel contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(36, 36, 36, 36)); contentPane.setLayout(null);/*from w w w .j a v a2s . co m*/ JPanel guestPanel = new JPanel(); guestPanel.setBounds(38, 40, 825, 140); guestPanel.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.RAISED, new Color(153, 180, 209), null), " For Guest ", TitledBorder.CENTER, TitledBorder.TOP, null, new Color(0, 120, 215))); contentPane.add(guestPanel); guestPanel.setLayout(null); JButton guestBtn = new JButton(GuestBtnLbl); guestBtn.setBounds(606, 50, 140, 36); guestBtn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { submitRequest(null, null); } }); guestPanel.add(guestBtn); JLabel guestLbl = new JLabel("Log in as a guest to download public data only"); guestLbl.setBounds(70, 50, 460, 42); guestPanel.add(guestLbl); JPanel loginUserPanel = new JPanel(); loginUserPanel.setBounds(40, 258, 825, 306); contentPane.add(loginUserPanel); loginUserPanel .setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, new Color(153, 180, 209), null), " Login to Download Authorized Data ", TitledBorder.CENTER, TitledBorder.TOP, null, new Color(0, 120, 215))); loginUserPanel.setLayout(null); JLabel lblNewLabel_1 = new JLabel("User Name"); lblNewLabel_1.setBounds(70, 80, 118, 36); loginUserPanel.add(lblNewLabel_1); JButton submitBtn = new JButton(SubmitBtnLbl); submitBtn.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { userId = userNameFld.getText(); password = passwdFld.getText(); if ((userId.length() < 1) || (password.length() < 1)) { statusLbl.setText("Please enter a valid user name and password."); statusLbl.setForeground(Color.red); } else { submitRequest(userId, password); } } }); submitBtn.setBounds(606, 238, 140, 36); loginUserPanel.add(submitBtn); userNameFld = new JTextField(); userNameFld.setBounds(200, 80, 333, 36); loginUserPanel.add(userNameFld); userNameFld.setColumns(10); JLabel lblPassword = new JLabel("Password"); lblPassword.setBounds(70, 156, 118, 36); loginUserPanel.add(lblPassword); passwdFld = new JPasswordField(); passwdFld.setBounds(200, 156, 333, 36); loginUserPanel.add(passwdFld); statusLbl = new JLabel(""); statusLbl.setBounds(70, 226, 463, 36); loginUserPanel.add(statusLbl); JLabel lblOr = new JLabel("--- OR ---"); lblOr.setBounds(419, 212, 81, 26); contentPane.add(lblOr); JLabel versionLabel = new JLabel("Release " + DownloaderProperties.getAppVersion() + " Build \"" + DownloaderProperties.getBuildTime() + "\""); versionLabel.setHorizontalAlignment(SwingConstants.CENTER); versionLabel.setForeground(new Color(70, 130, 180)); versionLabel.setBounds(315, 584, 260, 20); contentPane.add(versionLabel); userNameFld.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { passwdFld.requestFocus(); } }); userNameFld.addFocusListener(new FocusListener() { @Override public void focusGained(FocusEvent e) { statusLbl.setText(""); } @Override public void focusLost(FocusEvent e) { } }); passwdFld.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { userId = userNameFld.getText(); password = passwdFld.getText(); if ((userId.length() < 1) || (password.length() < 1)) { statusLbl.setText("Please enter a valid user name and password."); statusLbl.setForeground(Color.red); } else submitRequest(userId, password); } }); passwdFld.addFocusListener(new FocusListener() { @Override public void focusGained(FocusEvent e) { statusLbl.setText(""); } @Override public void focusLost(FocusEvent e) { } }); return contentPane; }
From source file:es.ubu.XRayDetector.interfaz.PanelAplicacion.java
/** * Gets the slider panel./*from w w w .ja va 2 s.c o m*/ * * @return the slider panel */ public JPanel getPanelSlider() { JPanel panelSlider = new JPanel(); panelSlider.setBorder( new TitledBorder(null, "Nivel de tolerancia", TitledBorder.LEADING, TitledBorder.TOP, null, null)); panelSlider.setBounds(10, 218, 262, 73); frmXraydetector.getContentPane().add(panelSlider); panelSlider.setLayout(new GridLayout(1, 1, 0, 0)); return panelSlider; }
From source file:com.mgmtp.perfload.loadprofiles.ui.AppFrame.java
/** * Mostly created by Eclipse WindowBuilder *//*ww w . ja v a2 s . c o m*/ private void initComponents() { setTitle("perfLoad - Load Profile Configurator"); setSize(1032, 984); setLocationRelativeTo(null); setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); SwingUtils.setUIFontStyle(Font.PLAIN); { JMenuBar menuBar = new JMenuBar(); menuBar.setName("menuBar"); setJMenuBar(menuBar); initMenuBar(menuBar); } contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); contentPane.setLayout(new MigLayout("insets 0", "[grow][]", "[25px][400][grow]")); { JToolBar toolBar = new JToolBar() { @Override protected JButton createActionComponent(final Action a) { JButton button = super.createActionComponent(a); button.setFocusable(false); button.setHideActionText(false); return button; } }; toolBar.setName("toolBar"); contentPane.add(toolBar, "cell 0 0 2 1,growx,aligny top"); initToolBar(toolBar); } { JScrollPane spTree = new JScrollPane(); spTree.setBorder(new CompoundBorder( new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Load Profile Elements", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)), new EmptyBorder(4, 4, 4, 4))); contentPane.add(spTree, "cell 0 1,grow"); spTree.setName("spTree"); { tree = new JTree(); tree.addKeyListener(new TreeKeyListener()); tree.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); tree.addTreeSelectionListener(new TreeTreeSelectionListener()); tree.setShowsRootHandles(true); tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); tree.setName("tree"); spTree.setViewportView(tree); } } { JPanel pnlMain = new JPanel(); contentPane.add(pnlMain, "cell 1 1"); pnlMain.setName("pnlMain"); pnlMain.setLayout(new MigLayout("insets 0", "[664!]", "[grow][]")); { JPanel pnlLoadProfileProperties = new JPanel(); pnlLoadProfileProperties.setBorder(new TitledBorder(null, "Load Profile Properties", TitledBorder.LEADING, TitledBorder.TOP, null, null)); pnlLoadProfileProperties.setName("pnlLoadProfileProperties"); pnlMain.add(pnlLoadProfileProperties, "flowx,cell 0 0,grow"); pnlLoadProfileProperties .setLayout(new MigLayout("insets 4", "[270,grow]8[]8[200]8[]8[200]", "[][][][grow]")); { lblName = new JLabel("Name"); lblName.setDisplayedMnemonic('N'); lblName.setHorizontalAlignment(SwingConstants.CENTER); lblName.setName("lblName"); pnlLoadProfileProperties.add(lblName, "cell 0 0"); } { JSeparator separator = new JSeparator(); separator.setPreferredSize(new Dimension(0, 200)); separator.setOrientation(SwingConstants.VERTICAL); separator.setName("separator"); pnlLoadProfileProperties.add(separator, "cell 1 0 1 4, growy"); } { JLabel lblClient = new JLabel("Clients"); lblClient.setName("lblClient"); pnlLoadProfileProperties.add(lblClient, "cell 2 0"); } { JSeparator separator = new JSeparator(); separator.setPreferredSize(new Dimension(0, 200)); separator.setOrientation(SwingConstants.VERTICAL); separator.setName("separator"); pnlLoadProfileProperties.add(separator, "cell 3 0 1 4, growy"); } { lblTargets = new JLabel("Targets"); lblTargets.setName("lblTargets"); pnlLoadProfileProperties.add(lblTargets, "cell 4 0"); } { txtName = new JTextField(); lblName.setLabelFor(txtName); txtName.setColumns(10); txtName.setName("txtName"); txtName.getDocument().addDocumentListener(dirtyListener); pnlLoadProfileProperties.add(txtName, "cell 0 1,growx"); } { JScrollPane spClients = new JScrollPane(); spClients.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); spClients.setName("spClients"); pnlLoadProfileProperties.add(spClients, "cell 2 1 1 3,grow"); { tblClients = new JCheckListTable(); tblClients.setName("tblClients"); spClients.setViewportView(tblClients); spClients.setColumnHeaderView(null); } } { JScrollPane spTargets = new JScrollPane(); spTargets.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); spTargets.setName("spTargets"); pnlLoadProfileProperties.add(spTargets, "cell 4 1 1 3,grow"); { tblTargets = new JCheckListTable(); tblTargets.setName("tblTargets"); spTargets.setViewportView(tblTargets); spTargets.setColumnHeaderView(null); } } { lblDescription = new JLabel("Description"); lblDescription.setDisplayedMnemonic('D'); lblDescription.setName("lblDescription"); pnlLoadProfileProperties.add(lblDescription, "cell 0 2"); } { JScrollPane spDescription = new JScrollPane(); spDescription.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); spDescription.setName("spDescription"); pnlLoadProfileProperties.add(spDescription, "cell 0 3,height 50:50:,grow"); { taDescription = new JTextArea(); taDescription.setFont(txtName.getFont()); lblDescription.setLabelFor(taDescription); taDescription.setRows(3); taDescription.setName("taDescription"); taDescription.getDocument().addDocumentListener(dirtyListener); spDescription.setViewportView(taDescription); } } } { JPanel pnlCurveAssignment = new JPanel(); pnlCurveAssignment.setBorder(new TitledBorder(null, "Active Load Curve Assignment", TitledBorder.LEADING, TitledBorder.TOP, null, null)); pnlMain.add(pnlCurveAssignment, "cell 0 1,grow"); pnlCurveAssignment.setLayout(new MigLayout("insets 4", "[grow]", "[grow][]")); { pnlCard = new JPanel(); pnlCard.setName("pnlCard"); pnlCurveAssignment.add(pnlCard, "cell 0 0,grow"); cardLayout = new CardLayout(0, 0); pnlCard.setLayout(cardLayout); { stairsPanel = new StairsPanel(); stairsPanel.setName("stairsPanel"); pnlCard.add(stairsPanel, "stairs"); } { oneTimePanel = new OneTimePanel(); oneTimePanel.setName("oneTimePanel"); pnlCard.add(oneTimePanel, "oneTime"); } { markerPanel = new MarkerPanel(); markerPanel.setName("markerPanel"); pnlCard.add(markerPanel, "marker"); } { JLabel lblNoActiveCurve = new JLabel("no active curve assignment"); lblNoActiveCurve.setHorizontalAlignment(SwingConstants.CENTER); pnlCard.add(lblNoActiveCurve, "none"); lblNoActiveCurve.setName("lblNoActiveCurve"); } } { btnOk = new JButtonExt("OK"); getRootPane().setDefaultButton(btnOk); btnOk.setEnabled(false); btnOk.addActionListener(new BtnOkActionListener()); btnOk.setMnemonic(KeyEvent.VK_O); btnOk.setName("btnOk"); pnlCurveAssignment.add(btnOk, "cell 0 1,alignx right"); } { btnCancel = new JButtonExt("Cancel"); btnCancel.setEnabled(false); btnCancel.addActionListener(new BtnCancelActionListener()); btnCancel.setMnemonic(KeyEvent.VK_C); btnCancel.setName("btnCancel"); pnlCurveAssignment.add(btnCancel, "cell 0 1,alignx right"); } } } }
From source file:de.adv_online.aaa.katalogtool.KatalogDialog.java
private Component createMainTab() { // bernahme der Eigenschaften String s = ""; String appSchemaStr;//from w ww . j a va 2 s . c o m s = options.parameter("appSchemaName"); if (s != null && s.trim().length() > 0) appSchemaStr = s.trim(); else appSchemaStr = ""; String schemaKennungenStr; s = options.parameter(paramKatalogClass, "schemakennungen"); if (s != null && s.trim().length() > 0) schemaKennungenStr = s.trim(); else schemaKennungenStr = "*"; Boolean geerbEigBool = false; s = options.parameter(paramKatalogClass, "geerbteEigenschaften"); if (s != null && s.equals("true")) geerbEigBool = true; String modellartenStr; s = options.parameter(paramKatalogClass, "modellarten"); if (s == null || s.trim().length() == 0) modellartenStr = ""; else modellartenStr = s.trim(); Boolean grundDatBool = false; s = options.parameter(paramKatalogClass, "nurGrunddatenbestand"); if (s != null && s.equals("true")) grundDatBool = true; Boolean profEinschrBool = false; Boolean profDateiBool = false; String profileStr; s = options.parameter(paramKatalogClass, "profile"); if (s == null || s.trim().length() == 0) profileStr = ""; else profileStr = s.trim(); if (profileStr.length() > 0) profEinschrBool = true; s = options.parameter(paramKatalogClass, "profilquelle"); if (s != null && s.trim().equals("Datei")) profDateiBool = true; Boolean pkgBool = false; String pkgStr; s = options.parameter(paramKatalogClass, "paket"); if (s == null || s.trim().length() == 0) pkgStr = ""; else pkgStr = s.trim(); if (pkgStr.length() > 0) pkgBool = true; String xsltPfadStr; s = options.parameter(paramKatalogClass, "xsltPfad"); if (s == null || s.trim().length() == 0) xsltPfadStr = ""; else { if (s.toLowerCase().startsWith("http://")) { xsltPfadStr = s; } else { File f = new File(s.trim()); if (f.exists()) xsltPfadStr = f.getAbsolutePath(); else xsltPfadStr = ""; } } String outDirStr; s = options.parameter(paramKatalogClass, "Verzeichnis"); if (s == null || s.trim().length() == 0) outDirStr = ""; else { File f = new File(s.trim()); if (f.exists()) outDirStr = f.getAbsolutePath(); else outDirStr = ""; } String mdlDirStr = eap; // Anwendungsschema final JPanel appSchemaPanel = new JPanel(); final JPanel appSchemaInnerPanel = new JPanel(new FlowLayout(FlowLayout.LEADING, 30, 5)); appSchemaPanel.setLayout(new BoxLayout(appSchemaPanel, BoxLayout.X_AXIS)); appSchemaPanel.setBorder(BorderFactory.createEmptyBorder(15, 20, 15, 10)); appSchemaField = new JTextField(37); appSchemaField.setText(appSchemaStr); appSchemaFieldLabel = new JLabel("Name des zu exportierenden Anwendungsschemas:"); Box asBox = Box.createVerticalBox(); asBox.add(appSchemaFieldLabel); asBox.add(appSchemaField); pkgBox = new JCheckBox("Eingeschrnkt auf Paket:"); pkgBox.setSelected(pkgBool); pkgBox.addItemListener(this); pkgField = new JTextField(37); pkgField.setText(pkgStr); if (pkgStr.length() == 0) { pkgField.setEnabled(false); pkgField.setEditable(false); } asBox.add(pkgBox); asBox.add(pkgField); appSchemaInnerPanel.add(asBox); appSchemaPanel.add(appSchemaInnerPanel); // Ausgabeoptionen Box outOptBox = Box.createVerticalBox(); final JPanel outOptInnerPanel = new JPanel(new FlowLayout(FlowLayout.LEADING, 15, 5)); Box skBox = Box.createVerticalBox(); schemaKennFieldLabel1 = new JLabel("Liste der zu bercksichtigenden Schema-Kennungen"); skBox.add(schemaKennFieldLabel1); schemaKennFieldLabel2 = new JLabel("(nur Klassen mit diesen Kennungen werden exportiert)"); skBox.add(schemaKennFieldLabel2); schemaKennField = new JTextField(35); schemaKennField.setText(schemaKennungenStr); skBox.add(schemaKennField); outOptInnerPanel.add(skBox); outOptBox.add(outOptInnerPanel); final JPanel targetPanel = new JPanel(new FlowLayout(FlowLayout.LEADING, 10, 5)); for (String label : targetLabels) { targetPanel.add(targetGuiElems.get(label).selBox); } outOptBox.add(targetPanel); final JPanel geerbEigPanel = new JPanel(new FlowLayout(FlowLayout.LEADING, 10, 5)); geerbEigBox = new JCheckBox("Eigenschaften aus Superklassen auch in abgeleiteten Klassen darstellen"); geerbEigBox.setSelected(geerbEigBool); geerbEigBox.addItemListener(this); geerbEigPanel.add(geerbEigBox); outOptBox.add(geerbEigPanel); final JPanel outOptPanel = new JPanel(); outOptPanel.add(outOptBox); outOptPanel.setBorder(new TitledBorder(new LineBorder(Color.black), "Ausgabeoptionen", TitledBorder.LEFT, TitledBorder.TOP)); // Modellarten und Profile Box modProfBox = Box.createVerticalBox(); final JPanel modProfInnerPanel1 = new JPanel(new FlowLayout(FlowLayout.LEADING, 15, 5)); skBox = Box.createVerticalBox(); modellartFieldLabel = new JLabel("Ausgewhlte Modellarten:"); modellartField = new JTextField(45); modellartField.setText(modellartenStr); skBox.add(modellartFieldLabel); skBox.add(modellartField); modProfInnerPanel1.add(skBox); modProfBox.add(modProfInnerPanel1); final JPanel grundDatPanel = new JPanel(new FlowLayout(FlowLayout.LEADING, 10, 8)); grundDatBox = new JCheckBox("Nur Grunddatenbestand exportieren"); grundDatBox.setSelected(grundDatBool); grundDatBox.addItemListener(this); grundDatPanel.add(grundDatBox); modProfBox.add(grundDatPanel); final JPanel profPanel = new JPanel(new FlowLayout(FlowLayout.LEADING, 10, 5)); profEinschrBox = new JCheckBox("Eingeschrnkt auf folgende Profilkennung(en) im Modell:"); profEinschrBox.setSelected(profEinschrBool); profEinschrBox.addItemListener(this); profPanel.add(profEinschrBox); final JPanel profPanel2 = new JPanel(new FlowLayout(FlowLayout.LEADING, 15, 2)); profileField = new JTextField(45); profileField.setText(profileStr); profPanel2.add(profileField); final JPanel profPanel3 = new JPanel(new FlowLayout(FlowLayout.LEADING, 15, 2)); profDateiBox = new JCheckBox( "Profil(e) nur aus 3ap-Datei laden und verwenden statt der Profilkennungen aus dem Modell"); profDateiBox.setSelected(profDateiBool); profDateiBox.addItemListener(this); profPanel3.add(profDateiBox); if (profileStr.length() == 0) { profileField.setEnabled(false); profileField.setEditable(false); profDateiBox.setEnabled(false); } modProfBox.add(profPanel); modProfBox.add(profPanel2); modProfBox.add(profPanel3); final JPanel modProfPanel = new JPanel(); modProfPanel.add(modProfBox); modProfPanel.setBorder(new TitledBorder(new LineBorder(Color.black), "Auswahl der Modellarten und Profile", TitledBorder.LEFT, TitledBorder.TOP)); // Pfadangaben Box pfadBox = Box.createVerticalBox(); final JPanel pfadInnerPanel = new JPanel(); skBox = Box.createVerticalBox(); xsltpfadFieldLabel = new JLabel("Pfad in dem die XSLT-Skripte liegen:"); skBox.add(xsltpfadFieldLabel); xsltpfadField = new JTextField(45); xsltpfadField.setText(xsltPfadStr); skBox.add(xsltpfadField); outDirFieldLabel = new JLabel("Pfad in den die Kataloge geschrieben werden:"); skBox.add(outDirFieldLabel); outDirField = new JTextField(45); outDirField.setText(outDirStr); skBox.add(outDirField); mdlDirFieldLabel = new JLabel("Pfad zum Modell:"); skBox.add(mdlDirFieldLabel); mdlDirField = new JTextField(45); mdlDirField.setText(mdlDirStr); skBox.add(mdlDirField); pfadInnerPanel.add(skBox); pfadBox.add(pfadInnerPanel); final JPanel pfadPanel = new JPanel(); pfadPanel.add(pfadBox); pfadPanel.setBorder( new TitledBorder(new LineBorder(Color.black), "Pfadangaben", TitledBorder.LEFT, TitledBorder.TOP)); // Zusammenstellung Box fileBox = Box.createVerticalBox(); fileBox.add(appSchemaPanel); fileBox.add(outOptPanel); fileBox.add(modProfPanel); fileBox.add(pfadPanel); JPanel panel = new JPanel(new BorderLayout()); panel.add(fileBox, BorderLayout.NORTH); return panel; }
From source file:es.ubu.XRayDetector.interfaz.PanelAplicacion.java
/** * Gets the application panel log.//from w w w .j a v a2 s . c o m * * @return the application panel log. */ private JPanel getPanelLog() { panelLog_1 = new JPanel(); panelLog_1.setBorder(new TitledBorder(null, "Log", TitledBorder.LEADING, TitledBorder.TOP, null, null)); panelLog_1.setBounds(10, 425, 262, 320); frmXraydetector.getContentPane().add(panelLog_1); return panelLog_1; }