List of usage examples for java.awt BorderLayout WEST
String WEST
To view the source code for java.awt BorderLayout WEST.
Click Source Link
From source file:it.staiger.jmeter.protocol.http.config.gui.DynamicFilePanel.java
/** * Initialize the components and layout of this component. */// w w w.j ava 2s . c o m private void init() { JPanel p = this; if (standalone) { setLayout(new BorderLayout(0, 5)); setBorder(makeBorder()); add(makeTitlePanel(), BorderLayout.NORTH); p = new JPanel(); } p.setLayout(new BorderLayout()); p.add(makeFilePanel(), BorderLayout.CENTER); // Force a minimum table height of 100 pixels p.add(Box.createVerticalStrut(100), BorderLayout.WEST); if (standalone) { p.add(makeImportPanel(), BorderLayout.SOUTH); add(p, BorderLayout.CENTER); } table.revalidate(); sizeColumns(table); }
From source file:org.apache.oodt.cas.workflow.gui.perspective.view.impl.DefaultPropView.java
private JPanel getPriorityPanel(final ViewState state) { JPanel panel = new JPanel(); panel.setBorder(new EtchedBorder()); panel.setLayout(new BorderLayout()); panel.add(new JLabel("Priority: "), BorderLayout.WEST); final JLabel priorityLabel = new JLabel(String.valueOf(DEFAULT_PRIORITY)); panel.add(priorityLabel, BorderLayout.CENTER); JSlider slider = new JSlider(0, 100, (int) 5 * 10); slider.setMajorTickSpacing(10);// w ww. j a va2 s .c o m slider.setMinorTickSpacing(1); slider.setPaintLabels(true); slider.setPaintTicks(true); slider.setSnapToTicks(false); Format f = new DecimalFormat("0.0"); Hashtable<Integer, JComponent> labels = new Hashtable<Integer, JComponent>(); for (int i = 0; i <= 10; i += 2) { JLabel label = new JLabel(f.format(i)); label.setFont(label.getFont().deriveFont(Font.PLAIN)); labels.put(i * 10, label); } slider.setLabelTable(labels); slider.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { double value = ((JSlider) e.getSource()).getValue() / 10.0; priorityLabel.setText(value + ""); priorityLabel.revalidate(); if (!((JSlider) e.getSource()).getValueIsAdjusting()) { // FIXME: deal with priorities DefaultPropView.this.notifyListeners(); } } }); panel.add(slider, BorderLayout.SOUTH); return panel; }
From source file:edu.ucla.stat.SOCR.chart.SuperHistogramChart.java
/** * make the show_all panel//from w w w . j a va2 s.c om */ protected void setMixPanel() { /*super.setMixPanel(); return;*/ dataPanel2.removeAll(); graphPanel2.removeAll(); chartPanel.setPreferredSize(new Dimension(CHART_SIZE_X * 2 / 3, CHART_SIZE_Y * 2 / 3)); graphPanel2.add(chartPanel); sliderPanel.removeAll(); /* sliderPanel.add(new JLabel("Bin Size")); sliderPanel.add(this.binSlider); sliderPanel.add(new JLabel(":"+this.binSlider.getValue()));*/ binSlider2.setPreferredSize(new Dimension(CHART_SIZE_X * 2 / 3, 100)); sliderPanel.add(this.binSlider2); sliderPanel.setPreferredSize(new Dimension(CHART_SIZE_X * 2 / 3, 100)); graphPanel2.add(sliderPanel); // the slider graphPanel2.validate(); dataPanel2.add(new JLabel(" ")); dataPanel2.add(new JLabel("Data")); JScrollPane dt = new JScrollPane(dataTable); dt.setRowHeaderView(headerTable); dt.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y * 3 / 8)); dataPanel2.add(dt); JScrollPane st = new JScrollPane(summaryPanel); st.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y / 6)); dataPanel2.add(st); st.validate(); dataPanel2.add(new JLabel(" ")); dataPanel2.add(new JLabel("Mapping")); mapPanel.setPreferredSize(new Dimension(CHART_SIZE_X / 3, CHART_SIZE_Y / 2)); dataPanel2.add(mapPanel); dataPanel2.validate(); mixPanel.removeAll(); mixPanel.add(graphPanel2, BorderLayout.WEST); mixPanel.add(new JScrollPane(dataPanel2), BorderLayout.CENTER); mixPanel.validate(); }
From source file:edu.ku.brc.specify.Specify.java
/** * /*from w w w . j av a 2 s . c o m*/ */ private void startupContinuing() // needs to be called on the UI Thread { // Adjust Default Swing UI Default Resources (Color, Fonts, etc) per Platform UIHelper.adjustUIDefaults(); setupDefaultFonts(); if (!UIRegistry.doesAppversionsMatch()) { System.exit(0); } // Attachment related helpers Thumbnailer thumb = Thumbnailer.getInstance(); File thumbnailDir = null; try { thumbnailDir = XMLHelper.getConfigDir("thumbnail_generators.xml"); //$NON-NLS-1$ thumb.registerThumbnailers(thumbnailDir); } catch (Exception e1) { throw new RuntimeException("Couldn't find thumbnailer xml [" //$NON-NLS-1$ + (thumbnailDir != null ? thumbnailDir.getAbsolutePath() : "") + "]"); //$NON-NLS-1$ //$NON-NLS-2$ } thumb.setQuality(.5f); thumb.setMaxSize(256, 256); // Load Local Prefs AppPreferences localPrefs = AppPreferences.getLocalPrefs(); //localPrefs.setDirPath(UIRegistry.getAppDataDir()); //localPrefs.load(); moved to end for not-null constraint /*String derbyPath = localPrefs.get("javadb.location", null); if (StringUtils.isNotEmpty(derbyPath)) { UIRegistry.setJavaDBDir(derbyPath); log.debug("JavaDB Path: "+UIRegistry.getJavaDBPath()); }*/ String userSplashIconPath = AppPreferences.getLocalPrefs().get("specify.bg.image", null); if (userSplashIconPath != null) { SystemPrefs.changeSplashImage(); } AttachmentUtils.setThumbnailer(thumb); DefaultClassActionHandler defClassActionHandler = DefaultClassActionHandler.getInstance(); ActionListener attachmentDisplayer = AttachmentUtils.getAttachmentDisplayer(); Class<?>[] attachmentClasses = { Attachment.class, AccessionAttachment.class, AgentAttachment.class, BorrowAttachment.class, CollectingEventAttachment.class, CollectionObjectAttachment.class, ConservDescriptionAttachment.class, ConservEventAttachment.class, DNASequenceAttachment.class, DNASequencingRunAttachment.class, FieldNotebookAttachment.class, FieldNotebookPageAttachment.class, FieldNotebookPageSetAttachment.class, GiftAttachment.class, LoanAttachment.class, LocalityAttachment.class, PermitAttachment.class, PreparationAttachment.class, ReferenceWorkAttachment.class, RepositoryAgreementAttachment.class, StorageAttachment.class, TaxonAttachment.class, TreatmentEventAttachment.class, }; for (Class<?> cls : attachmentClasses) { defClassActionHandler.registerActionHandler(cls, attachmentDisplayer); } UsageTracker.incrUsageCount("RunCount"); //$NON-NLS-1$ //UIHelper.attachUnhandledException(); FileCache.setDefaultPath(UIRegistry.getAppDataDir() + File.separator + "cache"); //$NON-NLS-1$ cacheManager.registerCache(UIRegistry.getLongTermFileCache()); cacheManager.registerCache(UIRegistry.getShortTermFileCache()); cacheManager.registerCache(UIRegistry.getFormsCache()); cacheManager.registerCache(JasperReportsCache.getInstance()); UIRegistry.register(UIRegistry.MAINPANE, this); // important to be done immediately specifyApp = this; // this code simply demonstrates the creation of a system tray icon for Sp6 // perhaps someday we may want to use this capability // SystemTray sysTray = SystemTray.getSystemTray(); // PopupMenu popup = new PopupMenu("Sp6"); // MenuItem exitItem = new MenuItem("Exit"); // exitItem.addActionListener(new ActionListener() // { // public void actionPerformed(ActionEvent ae) // { // doExit(); // } // }); // popup.add(exitItem); // TrayIcon sp6icon = new TrayIcon(IconManager.getIcon("Specify16").getImage(),"Sepcify 6",popup); // try // { // sysTray.add(sp6icon); // } // catch (AWTException e1) // { // // TODO Auto-generated catch block // e1.printStackTrace(); // } //log.info("Creating Database configuration "); //$NON-NLS-1$ if (!isWorkbenchOnly) { HibernateUtil.setListener("post-commit-update", //$NON-NLS-1$ new edu.ku.brc.specify.dbsupport.PostUpdateEventListener()); HibernateUtil.setListener("post-commit-insert", //$NON-NLS-1$ new edu.ku.brc.specify.dbsupport.PostInsertEventListener()); // SInce Update get called when deleting an object there is no need to register this class. // The update deletes because first it removes the Lucene document and then goes to add it back in, but since the // the record is deleted it doesn't get added. HibernateUtil.setListener("post-commit-delete", //$NON-NLS-1$ new edu.ku.brc.specify.dbsupport.PostDeleteEventListener()); //HibernateUtil.setListener("delete", new edu.ku.brc.specify.dbsupport.DeleteEventListener()); } adjustLocaleFromPrefs(); CommandDispatcher.register(BaseTask.APP_CMD_TYPE, this); CommandDispatcher.register(ERRMSG, this); DatabaseLoginPanel.MasterPasswordProviderIFace usrPwdProvider = new DatabaseLoginPanel.MasterPasswordProviderIFace() { @Override public boolean hasMasterUserAndPwdInfo(final String username, final String password, final String dbName) { if (StringUtils.isNotEmpty(username) && StringUtils.isNotEmpty(password)) { UserAndMasterPasswordMgr.getInstance().set(username, password, dbName); return UserAndMasterPasswordMgr.getInstance().hasMasterUsernameAndPassword(); } return false; } @Override public Pair<String, String> getUserNamePassword(final String username, final String password, final String dbName) { UserAndMasterPasswordMgr.getInstance().set(username, password, dbName); Pair<String, String> usrPwd = UserAndMasterPasswordMgr.getInstance().getUserNamePasswordForDB(); return usrPwd; } @Override public boolean editMasterInfo(final String username, final String databaseNameArg, final boolean askForCredentials) { return UserAndMasterPasswordMgr.getInstance().editMasterInfo(username, databaseNameArg, askForCredentials); } }; if (UIRegistry.isMobile()) { DBConnection.setShutdownUI(new DBConnection.ShutdownUIIFace() { CustomDialog processDlg; /* (non-Javadoc) * @see edu.ku.brc.dbsupport.DBConnection.ShutdownUIIFace#displayInitialDlg() */ @Override public void displayInitialDlg() { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { UIRegistry.showLocalizedMsg(JOptionPane.INFORMATION_MESSAGE, "MOBILE_INFO", "MOBILE_INTRO"); } }); } /* (non-Javadoc) * @see edu.ku.brc.dbsupport.DBConnection.ShutdownUIIFace#displayFinalShutdownDlg() */ @Override public void displayFinalShutdownDlg() { processDlg.setVisible(false); UIRegistry.showLocalizedMsg(JOptionPane.INFORMATION_MESSAGE, "MOBILE_INFO", "MOBILE_FINI"); } /* (non-Javadoc) * @see edu.ku.brc.dbsupport.DBConnection.ShutdownUIIFace#displayShutdownMsgDlg() */ @Override public void displayShutdownMsgDlg() { JPanel panel = new JPanel(new BorderLayout()); panel.setBorder(BorderFactory.createEmptyBorder(14, 14, 14, 14)); panel.add(new JLabel(IconManager.getIcon(getLargeIconName()), SwingConstants.CENTER), BorderLayout.WEST); panel.add(UIHelper.createI18NLabel("MOBILE_SHUTTING_DOWN", SwingConstants.CENTER), BorderLayout.CENTER); processDlg = new CustomDialog((Frame) null, "Shutdown", false, CustomDialog.NONE_BTN, panel); processDlg.setAlwaysOnTop(true); UIHelper.centerAndShow(processDlg); } }); } /*long lastSaved = AppPreferences.getLocalPrefs().getLong("update_time", 0L); if (lastSaved > 0) { Date now = Calendar.getInstance().getTime(); double elapsedMinutes = (now.getTime() - lastSaved) / 60000.0; log.debug(elapsedMinutes); if (elapsedMinutes < 1.0) { AppPreferences.setBlockTimer(); UIRegistry.showError("You are currently logged in.\n Logging in twice will cause problems for your account."); System.exit(0); } }*/ UIRegistry.dumpPaths(); dbLoginPanel = UIHelper.doLogin(usrPwdProvider, true, false, false, this, getLargeIconName(), getTitle(), null, getOpaqueIconName(), "login"); // true means do auto login if it can, second bool means use dialog instead of frame localPrefs.load(); }
From source file:org.eobjects.datacleaner.windows.AnalysisJobBuilderWindowImpl.java
@Override protected JComponent getWindowContent() { if (_datastore != null) { setDatastore(_datastore);/*from www .j a v a 2s . c om*/ } setJMenuBar(_windowMenuBar); _sourceTabOuterPanel.add(_datastoreListPanelRef.get()); _sourceTabOuterPanel.add(_sourceColumnsPanel); // add source tab _tabbedPane.addTab("Source", imageManager.getImageIcon("images/model/source.png", TAB_ICON_SIZE), WidgetUtils.scrolleable(_sourceTabOuterPanel)); _tabbedPane.setRightClickActionListener(SOURCE_TAB, new HideTabTextActionListener(_tabbedPane, SOURCE_TAB)); _tabbedPane.setUnclosableTab(SOURCE_TAB); // add metadata tab _tabbedPane.addTab("Metadata", imageManager.getImageIcon("images/model/metadata.png", TAB_ICON_SIZE), _metadataPanel); _tabbedPane.setRightClickActionListener(METADATA_TAB, new HideTabTextActionListener(_tabbedPane, METADATA_TAB)); _tabbedPane.setUnclosableTab(METADATA_TAB); // add separator for fixed vs dynamic tabs _tabbedPane.addSeparator(); final SaveAnalysisJobActionListener saveAnalysisJobActionListener = _saveAnalysisJobActionListenerProvider .get(); _saveButton.addActionListener(saveAnalysisJobActionListener); _saveAsButton.addActionListener(saveAnalysisJobActionListener); _saveAsButton.setActionCommand(SaveAnalysisJobActionListener.ACTION_COMMAND_SAVE_AS); _visualizeButton.setToolTipText("Visualize execution flow"); _visualizeButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { VisualizeJobWindow window = new VisualizeJobWindow(_analysisJobBuilder, getWindowContext()); window.setVisible(true); } }); // Transform button _transformButton.addActionListener(_addTransformerActionListenerProvider.get()); // Analyze button _analyzeButton.addActionListener(_addAnalyzerActionListenerProvider.get()); // Run analysis final RunAnalysisActionListener runAnalysisActionListener = _runAnalysisActionProvider.get(); _executeButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { applyPropertyValues(); if (_analysisJobBuilder.getAnalyzerJobBuilders().isEmpty()) { // Present choices to user to write file somewhere, // and then run a copy of the job based on that. ExecuteJobWithoutAnalyzersDialog executeJobWithoutAnalyzersPanel = new ExecuteJobWithoutAnalyzersDialog( _injectorBuilder, getWindowContext(), _analysisJobBuilder, _userPreferences); executeJobWithoutAnalyzersPanel.open(); return; } runAnalysisActionListener.actionPerformed(e); } }); final JToolBar toolBar = WidgetFactory.createToolBar(); toolBar.add(_saveButton); toolBar.add(_saveAsButton); toolBar.add(_visualizeButton); toolBar.add(WidgetFactory.createToolBarSeparator()); toolBar.add(_transformButton); toolBar.add(_analyzeButton); toolBar.add(WidgetFactory.createToolBarSeparator()); toolBar.add(_executeButton); final JXStatusBar statusBar = WidgetFactory.createStatusBar(_statusLabel); final LicenceAndEditionStatusLabel statusLabel = new LicenceAndEditionStatusLabel(_glassPane); statusBar.add(statusLabel); final DCPanel toolBarPanel = new DCPanel(WidgetUtils.BG_COLOR_LESS_DARK, WidgetUtils.BG_COLOR_DARK); toolBarPanel.setLayout(new BorderLayout()); toolBarPanel.add(toolBar, BorderLayout.CENTER); final DCPanel panel = new DCPersistentSizedPanel(_userPreferences, getClass().getName(), DEFAULT_WINDOW_WIDTH, DEFAULT_WINDOW_HEIGHT); panel.setLayout(new BorderLayout()); panel.add(toolBarPanel, BorderLayout.NORTH); panel.add(_leftPanel, BorderLayout.WEST); panel.add(_tabbedPane, BorderLayout.CENTER); panel.add(statusBar, BorderLayout.SOUTH); WidgetUtils.centerOnScreen(this); initializeExistingComponents(); return panel; }
From source file:com.tiempometa.muestradatos.JMuestraDatos.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY // //GEN-BEGIN:initComponents ResourceBundle bundle = ResourceBundle.getBundle("com.tiempometa.muestradatos.muestradatos"); menuBar1 = new JMenuBar(); menu1 = new JMenu(); configMenuItem = new JMenuItem(); importTagsMenuItem = new JMenuItem(); exportTagsMenuItem = new JMenuItem(); clearTagsMenuItem = new JMenuItem(); exitMenuItem = new JMenuItem(); menu3 = new JMenu(); aboutUsMenuItem = new JMenuItem(); configureJavaMenuItem = new JMenuItem(); panel5 = new JPanel(); panel3 = new JPanel(); panel4 = new JPanel(); tabbedPane1 = new JTabbedPane(); panel2 = new JPanel(); label9 = new JLabel(); label10 = new JLabel(); label3 = new JLabel(); readerPortLabel = new JLabel(); label11 = new JLabel(); boxIpAddressLabel = new JLabel(); label4 = new JLabel(); readerStatusLabel = new JLabel(); label12 = new JLabel(); boxTypeLabel = new JLabel(); label2 = new JLabel(); rssiLevelLabel = new JLabel(); label13 = new JLabel(); preferredReaderLabel = new JLabel(); label5 = new JLabel(); regionLabel = new JLabel(); label14 = new JLabel(); preferredAntenaLabel = new JLabel(); label6 = new JLabel(); readPowerLabel = new JLabel(); label7 = new JLabel(); writePowerLevel = new JLabel(); usbConnectButton = new JButton(); boxConnectButton = new JButton(); panel1 = new JPanel(); verifyDataButton = new JButton(); loadReadingsButton = new JButton(); readTagButton = new JButton(); countTagsButton = new JButton(); programTagButton = new JButton(); panel8 = new JPanel(); setBoxTimeButton = new JButton(); getBoxTimeButton = new JButton(); label20 = new JLabel(); label19 = new JLabel(); systemTimeLabel = new JLabel(); foxberryTimeLabel = new JLabel(); foxberryTimeDiffLabel = new JLabel(); panel6 = new JPanel(); label21 = new JLabel(); label1 = new JLabel(); usbStatusLabel = new JLabel(); label16 = new JLabel(); tcpStatusLabel = new JLabel(); label8 = new JLabel(); databaseLabel = new JLabel(); panel7 = new JPanel(); CellConstraints cc = new CellConstraints(); //======== this ======== setTitle(bundle.getString("JMuestraDatos.this.title")); setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); setIconImage(/*ww w .ja va 2 s . co m*/ new ImageIcon(getClass().getResource("/com/tiempometa/resources/tiempometa_icon_large_alpha.png")) .getImage()); setResizable(false); Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== menuBar1 ======== { //======== menu1 ======== { menu1.setText(bundle.getString("JMuestraDatos.menu1.text")); //---- configMenuItem ---- configMenuItem.setText(bundle.getString("JMuestraDatos.configMenuItem.text")); configMenuItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { configMenuItemActionPerformed(e); } }); menu1.add(configMenuItem); //---- importTagsMenuItem ---- importTagsMenuItem.setText(bundle.getString("JMuestraDatos.importTagsMenuItem.text")); importTagsMenuItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { importTagsMenuItemActionPerformed(e); } }); menu1.add(importTagsMenuItem); //---- exportTagsMenuItem ---- exportTagsMenuItem.setText(bundle.getString("JMuestraDatos.exportTagsMenuItem.text")); exportTagsMenuItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { exportTagsMenuItemActionPerformed(e); } }); menu1.add(exportTagsMenuItem); //---- clearTagsMenuItem ---- clearTagsMenuItem.setText(bundle.getString("JMuestraDatos.clearTagsMenuItem.text")); clearTagsMenuItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { clearTagsMenuItemActionPerformed(e); } }); menu1.add(clearTagsMenuItem); menu1.addSeparator(); //---- exitMenuItem ---- exitMenuItem.setText(bundle.getString("JMuestraDatos.exitMenuItem.text")); exitMenuItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItem2ActionPerformed(e); } }); menu1.add(exitMenuItem); } menuBar1.add(menu1); //======== menu3 ======== { menu3.setText(bundle.getString("JMuestraDatos.menu3.text")); //---- aboutUsMenuItem ---- aboutUsMenuItem.setText(bundle.getString("JMuestraDatos.aboutUsMenuItem.text")); aboutUsMenuItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { aboutUsMenuItemActionPerformed(e); } }); menu3.add(aboutUsMenuItem); //---- configureJavaMenuItem ---- configureJavaMenuItem.setText(bundle.getString("JMuestraDatos.configureJavaMenuItem.text")); configureJavaMenuItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { configureJavaMenuItemActionPerformed(e); } }); menu3.add(configureJavaMenuItem); } menuBar1.add(menu3); } setJMenuBar(menuBar1); //======== panel5 ======== { panel5.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.dluX(18)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(343)) }, new RowSpec[] { new RowSpec(Sizes.dluY(17)), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(17)) })); } contentPane.add(panel5, BorderLayout.NORTH); //======== panel3 ======== { panel3.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.dluX(16)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); } contentPane.add(panel3, BorderLayout.WEST); //======== panel4 ======== { panel4.setLayout( new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.dluX(410)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("245dlu"))); //======== tabbedPane1 ======== { tabbedPane1.setFont(new Font("Tahoma", Font.BOLD, 16)); //======== panel2 ======== { panel2.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.dluX(25)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(89)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(73)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(17)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(84)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(80)) }, new RowSpec[] { new RowSpec(Sizes.dluY(20)), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.DLUY8) })); //---- label9 ---- label9.setText(bundle.getString("JMuestraDatos.label9.text")); label9.setFont(new Font("Tahoma", Font.BOLD, 16)); label9.setIcon(new ImageIcon(getClass().getResource("/com/tiempometa/resources/usb_128.png"))); label9.setHorizontalAlignment(SwingConstants.CENTER); panel2.add(label9, cc.xywh(3, 3, 3, 1)); //---- label10 ---- label10.setText(bundle.getString("JMuestraDatos.label10.text")); label10.setFont(new Font("Tahoma", Font.BOLD, 16)); label10.setIcon( new ImageIcon(getClass().getResource("/com/tiempometa/resources/briefcase_128.png"))); label10.setHorizontalAlignment(SwingConstants.CENTER); panel2.add(label10, cc.xywh(9, 3, 3, 1)); //---- label3 ---- label3.setText(bundle.getString("JMuestraDatos.label3.text")); label3.setFont(new Font("Tahoma", Font.BOLD, 14)); panel2.add(label3, cc.xy(3, 5)); //---- readerPortLabel ---- readerPortLabel.setText(bundle.getString("JMuestraDatos.readerPortLabel.text")); panel2.add(readerPortLabel, cc.xy(5, 5)); //---- label11 ---- label11.setText(bundle.getString("JMuestraDatos.label11.text")); label11.setFont(new Font("Tahoma", Font.BOLD, 14)); panel2.add(label11, cc.xy(9, 5)); //---- boxIpAddressLabel ---- boxIpAddressLabel.setText(bundle.getString("JMuestraDatos.boxIpAddressLabel.text")); panel2.add(boxIpAddressLabel, cc.xy(11, 5)); //---- label4 ---- label4.setText(bundle.getString("JMuestraDatos.label4.text")); label4.setFont(new Font("Tahoma", Font.BOLD, 14)); panel2.add(label4, cc.xy(3, 7)); //---- readerStatusLabel ---- readerStatusLabel.setText(bundle.getString("JMuestraDatos.readerStatusLabel.text")); panel2.add(readerStatusLabel, cc.xy(5, 7)); //---- label12 ---- label12.setText(bundle.getString("JMuestraDatos.label12.text")); label12.setFont(new Font("Tahoma", Font.BOLD, 14)); panel2.add(label12, cc.xy(9, 7)); //---- boxTypeLabel ---- boxTypeLabel.setText(bundle.getString("JMuestraDatos.boxTypeLabel.text")); panel2.add(boxTypeLabel, cc.xy(11, 7)); //---- label2 ---- label2.setText(bundle.getString("JMuestraDatos.label2.text")); label2.setFont(new Font("Tahoma", Font.BOLD, 14)); panel2.add(label2, cc.xy(3, 9)); //---- rssiLevelLabel ---- rssiLevelLabel.setText(bundle.getString("JMuestraDatos.rssiLevelLabel.text")); panel2.add(rssiLevelLabel, cc.xy(5, 9)); //---- label13 ---- label13.setText(bundle.getString("JMuestraDatos.label13.text")); label13.setFont(new Font("Tahoma", Font.BOLD, 14)); panel2.add(label13, cc.xy(9, 9)); //---- preferredReaderLabel ---- preferredReaderLabel.setText(bundle.getString("JMuestraDatos.preferredReaderLabel.text")); panel2.add(preferredReaderLabel, cc.xy(11, 9)); //---- label5 ---- label5.setText(bundle.getString("JMuestraDatos.label5.text")); label5.setFont(new Font("Tahoma", Font.BOLD, 14)); panel2.add(label5, cc.xy(3, 11)); //---- regionLabel ---- regionLabel.setText(bundle.getString("JMuestraDatos.regionLabel.text")); panel2.add(regionLabel, cc.xy(5, 11)); //---- label14 ---- label14.setText(bundle.getString("JMuestraDatos.label14.text")); label14.setFont(new Font("Tahoma", Font.BOLD, 14)); panel2.add(label14, cc.xy(9, 11)); //---- preferredAntenaLabel ---- preferredAntenaLabel.setText(bundle.getString("JMuestraDatos.preferredAntenaLabel.text")); panel2.add(preferredAntenaLabel, cc.xy(11, 11)); //---- label6 ---- label6.setText(bundle.getString("JMuestraDatos.label6.text")); label6.setFont(new Font("Tahoma", Font.BOLD, 14)); panel2.add(label6, cc.xy(3, 13)); //---- readPowerLabel ---- readPowerLabel.setText(bundle.getString("JMuestraDatos.readPowerLabel.text")); panel2.add(readPowerLabel, cc.xy(5, 13)); //---- label7 ---- label7.setText(bundle.getString("JMuestraDatos.label7.text")); label7.setFont(new Font("Tahoma", Font.BOLD, 14)); panel2.add(label7, cc.xy(3, 15)); //---- writePowerLevel ---- writePowerLevel.setText(bundle.getString("JMuestraDatos.writePowerLevel.text")); panel2.add(writePowerLevel, cc.xy(5, 15)); //---- usbConnectButton ---- usbConnectButton.setText(bundle.getString("JMuestraDatos.usbConnectButton.text")); usbConnectButton.setFont(new Font("Tahoma", Font.BOLD, 14)); usbConnectButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { usbConnectButtonActionPerformed(e); } }); panel2.add(usbConnectButton, cc.xywh(3, 17, 3, 1)); //---- boxConnectButton ---- boxConnectButton.setText(bundle.getString("JMuestraDatos.boxConnectButton.text")); boxConnectButton.setFont(new Font("Tahoma", Font.BOLD, 14)); boxConnectButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { boxConnectButtonActionPerformed(e); } }); panel2.add(boxConnectButton, cc.xywh(9, 17, 3, 1)); } tabbedPane1.addTab(bundle.getString("JMuestraDatos.panel2.tab.title"), panel2); //======== panel1 ======== { panel1.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.dluX(35)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(120)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(47)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(130)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(28)) }, new RowSpec[] { new RowSpec(Sizes.dluY(15)), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- verifyDataButton ---- verifyDataButton.setText(bundle.getString("JMuestraDatos.verifyDataButton.text")); verifyDataButton.setIcon( new ImageIcon(getClass().getResource("/com/tiempometa/resources/check_64.png"))); verifyDataButton.setHorizontalAlignment(SwingConstants.LEFT); verifyDataButton.setRolloverIcon(null); verifyDataButton.setPressedIcon(null); verifyDataButton.setFont(new Font("Tahoma", Font.BOLD, 16)); verifyDataButton.setEnabled(false); verifyDataButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { verifyDataButtonActionPerformed(e); } }); panel1.add(verifyDataButton, cc.xywh(3, 3, 3, 1)); //---- loadReadingsButton ---- loadReadingsButton.setText(bundle.getString("JMuestraDatos.loadReadingsButton.text")); loadReadingsButton.setIcon( new ImageIcon(getClass().getResource("/com/tiempometa/resources/load_64.png"))); loadReadingsButton.setHorizontalAlignment(SwingConstants.LEFT); loadReadingsButton.setFont(new Font("Tahoma", Font.BOLD, 16)); loadReadingsButton.setEnabled(false); loadReadingsButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { loadReadingsButtonActionPerformed(e); } }); panel1.add(loadReadingsButton, cc.xywh(7, 3, 3, 1)); //---- readTagButton ---- readTagButton.setText(bundle.getString("JMuestraDatos.readTagButton.text")); readTagButton.setIcon( new ImageIcon(getClass().getResource("/com/tiempometa/resources/scan_64.png"))); readTagButton.setHorizontalAlignment(SwingConstants.LEFT); readTagButton.setFont(new Font("Tahoma", Font.BOLD, 16)); readTagButton.setEnabled(false); readTagButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { readTagButtonActionPerformed(e); } }); panel1.add(readTagButton, cc.xywh(3, 5, 3, 1)); //---- countTagsButton ---- countTagsButton.setText(bundle.getString("JMuestraDatos.countTagsButton.text")); countTagsButton.setIcon( new ImageIcon(getClass().getResource("/com/tiempometa/resources/counter_64.png"))); countTagsButton.setHorizontalAlignment(SwingConstants.LEFT); countTagsButton.setFont(new Font("Tahoma", Font.BOLD, 16)); countTagsButton.setEnabled(false); countTagsButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { countTagsButtonActionPerformed(e); } }); panel1.add(countTagsButton, cc.xywh(7, 5, 3, 1)); //---- programTagButton ---- programTagButton.setText(bundle.getString("JMuestraDatos.programTagButton.text")); programTagButton.setIcon( new ImageIcon(getClass().getResource("/com/tiempometa/resources/record_64.png"))); programTagButton.setHorizontalAlignment(SwingConstants.LEFT); programTagButton.setFont(new Font("Tahoma", Font.BOLD, 16)); programTagButton.setEnabled(false); programTagButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { programTagButtonActionPerformed(e); } }); panel1.add(programTagButton, cc.xywh(3, 7, 3, 1)); } tabbedPane1.addTab(bundle.getString("JMuestraDatos.panel1.tab.title"), panel1); //======== panel8 ======== { panel8.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.dluX(35)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(160)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(160)) }, new RowSpec[] { new RowSpec(Sizes.dluY(15)), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- setBoxTimeButton ---- setBoxTimeButton.setText(bundle.getString("JMuestraDatos.setBoxTimeButton.text")); setBoxTimeButton.setIcon( new ImageIcon(getClass().getResource("/com/tiempometa/resources/set_time_64.png"))); setBoxTimeButton.setHorizontalAlignment(SwingConstants.LEFT); setBoxTimeButton.setFont(new Font("Tahoma", Font.BOLD, 16)); setBoxTimeButton.setEnabled(false); setBoxTimeButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { setBoxTimeButtonActionPerformed(e); } }); panel8.add(setBoxTimeButton, cc.xy(3, 3)); //---- getBoxTimeButton ---- getBoxTimeButton.setText(bundle.getString("JMuestraDatos.getBoxTimeButton.text")); getBoxTimeButton.setIcon( new ImageIcon(getClass().getResource("/com/tiempometa/resources/get_time_64.png"))); getBoxTimeButton.setHorizontalAlignment(SwingConstants.LEFT); getBoxTimeButton.setFont(new Font("Tahoma", Font.BOLD, 16)); getBoxTimeButton.setEnabled(false); getBoxTimeButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { getBoxTimeButtonActionPerformed(e); } }); panel8.add(getBoxTimeButton, cc.xy(5, 3)); //---- label20 ---- label20.setText(bundle.getString("JMuestraDatos.label20.text")); label20.setFont(new Font("Tahoma", Font.BOLD, 14)); panel8.add(label20, cc.xy(3, 5)); //---- label19 ---- label19.setText(bundle.getString("JMuestraDatos.label19.text")); label19.setFont(new Font("Tahoma", Font.BOLD, 14)); panel8.add(label19, cc.xy(5, 5)); panel8.add(systemTimeLabel, cc.xy(3, 7)); panel8.add(foxberryTimeLabel, cc.xy(5, 7)); panel8.add(foxberryTimeDiffLabel, cc.xy(5, 9)); } tabbedPane1.addTab(bundle.getString("JMuestraDatos.panel8.tab.title"), panel8); } panel4.add(tabbedPane1, cc.xy(1, 1)); } contentPane.add(panel4, BorderLayout.CENTER); //======== panel6 ======== { panel6.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.dluX(17)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(65)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(65)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(199)) }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(10)) })); //---- label21 ---- label21.setText(bundle.getString("JMuestraDatos.label21.text")); label21.setFont(new Font("Tahoma", Font.BOLD, 16)); panel6.add(label21, cc.xy(3, 1)); //---- label1 ---- label1.setText(bundle.getString("JMuestraDatos.label1.text")); label1.setFont(new Font("Tahoma", Font.PLAIN, 14)); panel6.add(label1, cc.xy(5, 1)); //---- usbStatusLabel ---- usbStatusLabel.setText(bundle.getString("JMuestraDatos.usbStatusLabel.text")); usbStatusLabel.setFont(new Font("Tahoma", Font.PLAIN, 14)); panel6.add(usbStatusLabel, cc.xy(7, 1)); //---- label16 ---- label16.setText(bundle.getString("JMuestraDatos.label16.text")); label16.setFont(new Font("Tahoma", Font.PLAIN, 14)); panel6.add(label16, cc.xy(9, 1)); //---- tcpStatusLabel ---- tcpStatusLabel.setText(bundle.getString("JMuestraDatos.tcpStatusLabel.text")); tcpStatusLabel.setFont(new Font("Tahoma", Font.PLAIN, 14)); panel6.add(tcpStatusLabel, cc.xy(11, 1)); //---- label8 ---- label8.setText(bundle.getString("JMuestraDatos.label8.text")); label8.setFont(new Font("Tahoma", Font.BOLD, 16)); panel6.add(label8, cc.xy(3, 3)); //---- databaseLabel ---- databaseLabel.setText(bundle.getString("JMuestraDatos.databaseLabel.text")); panel6.add(databaseLabel, cc.xywh(3, 5, 11, 1)); } contentPane.add(panel6, BorderLayout.SOUTH); //======== panel7 ======== { panel7.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); } contentPane.add(panel7, BorderLayout.EAST); setSize(740, 620); setLocationRelativeTo(getOwner()); // //GEN-END:initComponents }
From source file:pt.lsts.neptus.plugins.sunfish.awareness.SituationAwareness.java
@Override public void setActive(boolean mode, StateRenderer2D source) { super.setActive(mode, source); Container parent = source.getParent(); while (parent != null && !(parent.getLayout() instanceof BorderLayout)) parent = parent.getParent();// ww w.j a va 2s . co m if (mode) { JPanel panel = new JPanel(new BorderLayout()); panel.add(slider, BorderLayout.CENTER); panel.add(minTimeLabel, BorderLayout.WEST); panel.add(maxTimeLabel, BorderLayout.EAST); parent.add(panel, BorderLayout.SOUTH); } else { parent = slider.getParent().getParent(); parent.remove(slider.getParent()); } parent.invalidate(); parent.validate(); parent.repaint(); }
From source file:org.pentaho.reporting.tools.configeditor.ConfigDescriptionEditor.java
/** * Creates the class detail editor.// www . j a v a 2 s . c om * * @return the class detail editor. */ private JPanel createClassEditor() { baseClassField = new JTextField(); final JLabel baseClassValidateMessage = new JLabel(" "); final JLabel textLabel = new JLabel(resources.getString("config-description-editor.baseclass")); //$NON-NLS-1$ final JPanel panel = new JPanel(); panel.setLayout(new BorderLayout()); panel.add(textLabel, BorderLayout.WEST); panel.add(baseClassField, BorderLayout.CENTER); panel.add(baseClassValidateMessage, BorderLayout.SOUTH); final JPanel carrier = new JPanel(); carrier.setLayout(new BorderLayout()); carrier.add(panel, BorderLayout.NORTH); return carrier; }
From source file:org.pentaho.reporting.ui.datasources.olap4j.Olap4JDataSourceEditor.java
private JPanel createQueryListPanel() { // Create the query list panel final RemoveQueryAction queryRemoveAction = new RemoveQueryAction(); dialogModel.addPropertyChangeListener(queryRemoveAction); final JPanel theQueryButtonsPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT, 5, 5)); theQueryButtonsPanel.add(new BorderlessButton(new AddQueryAction())); theQueryButtonsPanel.add(new BorderlessButton(queryRemoveAction)); final JPanel theQueryControlsPanel = new JPanel(new BorderLayout()); theQueryControlsPanel.add(new JLabel(Messages.getString("Olap4JDataSourceEditor.AvailableQueriesLabel")), BorderLayout.WEST); theQueryControlsPanel.add(theQueryButtonsPanel, BorderLayout.EAST); final JPanel queryListPanel = new JPanel(new BorderLayout()); queryListPanel.setBorder(BorderFactory.createEmptyBorder(0, 8, 0, 8)); queryListPanel.add(BorderLayout.NORTH, theQueryControlsPanel); queryListPanel.add(BorderLayout.CENTER, new JScrollPane(queryNameList)); return queryListPanel; }
From source file:org.apache.oodt.cas.workflow.gui.perspective.view.impl.DefaultPropView.java
private JPanel getExecutionTypePanel(final ModelGraph graph, final ViewState state) { JPanel panel = new JPanel(); panel.setBorder(new EtchedBorder()); panel.setLayout(new BorderLayout()); panel.add(new JLabel("ExecutionType:"), BorderLayout.WEST); JComboBox comboBox = new JComboBox(); if (graph.hasChildren()) { comboBox.addItem("parallel"); comboBox.addItem("sequential"); } else if (graph.getModel().getExecutionType().equals("task")) { comboBox.addItem("parallel"); comboBox.addItem("sequential"); comboBox.addItem("task"); } else if (graph.isCondition() || graph.getModel().getExecutionType().equals("condition")) { comboBox.addItem("parallel"); comboBox.addItem("sequential"); comboBox.addItem("condition"); } else {/*from ww w. ja v a 2s .c o m*/ comboBox.addItem("parallel"); comboBox.addItem("sequential"); comboBox.addItem("task"); } comboBox.setSelectedItem(graph.getModel().getExecutionType()); comboBox.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { if (!graph.getModel().getExecutionType().equals(e.getItem())) { graph.getModel().setExecutionType((String) e.getItem()); DefaultPropView.this.notifyListeners(); DefaultPropView.this.refreshView(state); } } }); panel.add(comboBox, BorderLayout.CENTER); return panel; }