List of usage examples for javax.swing SwingConstants RIGHT
int RIGHT
To view the source code for javax.swing SwingConstants RIGHT.
Click Source Link
From source file:de.main.sessioncreator.DesktopApplication1View.java
private void showReportPanel() { sessionWizardMenuItem.setEnabled(true); reviewVieMenuItem.setEnabled(true);//from w w w . ja v a 2 s . c o m sessionReportMenuItem.setEnabled(false); viewReviewsPanel.setVisible(false); mainPanel.validate(); wizardPanel.setVisible(false); mainPanel.validate(); reportOverviewTable.setVisible(false); reportPanel.setVisible(true); mainPanel.validate(); this.getFrame().setTitle("SessionCreator - Report"); //Backgroundprozess to fill data to the reportPanel class ReportData extends SwingWorker<DefaultTableModel, Void> { @Override protected DefaultTableModel doInBackground() throws Exception { rh.addReport(reportChartPanel); reportScrollPOverviewTabel.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); reportScrollPOverviewTabel.setToolTipText("Please wait..."); reportlblSum.setText("Sums of Charters done: <counting>"); progressBar.setIndeterminate(true); progressBar.setVisible(true); model = new DefaultTableModel(); reportOverviewTable.removeAll(); model = rh.getTableModel(); reportOverviewTable.setModel(model); reportOverviewTable.setVisible(true); String count = rh.getAllSessionCount(model); reportlblSum.setText("Sums of Charters done: " + count); String[] text = rh.getAllBugsAndIssues(); reportlblBug.setText(text[0]); reportlblIssue.setText(text[1]); return model; } @Override protected void done() { try { reportScrollPOverviewTabel.setCursor(Cursor.getDefaultCursor()); reportScrollPOverviewTabel.setToolTipText(""); progressBar.setIndeterminate(false); progressBar.setVisible(false); reportScrollPOverviewTabel.setEnabled(true); reportOverviewTable.setFillsViewportHeight(true); reportOverviewTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); TableRowSorter<DefaultTableModel> rowSorter = new TableRowSorter<DefaultTableModel>(model); reportOverviewTable.setRowSorter(rowSorter); rowSorter.setComparator(1, new Comparator<Integer>() { @Override public int compare(Integer int1, Integer int2) { return int1.intValue() - int2.intValue(); } }); TableColumn column = null; for (int i = 0; i < 2; i++) { column = reportOverviewTable.getColumnModel().getColumn(i); if (i == 1) { column.setPreferredWidth(10); //third column is bigger DefaultTableCellRenderer myRenderer = new DefaultTableCellRenderer(); //Textalignment in second column right myRenderer.setHorizontalAlignment(SwingConstants.RIGHT); column.setCellRenderer(myRenderer); } else { column.setPreferredWidth(490); } } } catch ( /* InterruptedException, ExecutionException */Exception e) { } } } new ReportData().execute(); }
From source file:com.lynk.hrm.ui.dialog.InfoEmployee.java
private void initComponents() { addWindowListener(new WindowAdapter() { @Override//from w w w . jav a 2 s .c om public void windowClosing(WindowEvent e) { thisWindowClosing(e); } }); setSize(836, 674); setTitle(""); setIconImage( Toolkit.getDefaultToolkit().getImage(InfoEmployee.class.getResource("/resource/image/icon.png"))); setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE); getContentPane().setLayout(new BorderLayout(0, 0)); { JToolBar toolBar = new JToolBar(); toolBar.setFloatable(false); getContentPane().add(toolBar, BorderLayout.NORTH); { JButton uiSave = new JButton("?"); uiSave.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { uiSaveActionPerformed(true); } }); uiSave.setFocusable(false); uiSave.setIcon(new ImageIcon(InfoEmployee.class.getResource("/resource/image/emp_save.png"))); uiSave.setFont(APP_FONT); toolBar.add(uiSave); } toolBar.addSeparator(); { JButton uiReadIdCard = new JButton("??"); uiReadIdCard.setFont(APP_FONT); uiReadIdCard.setIcon( new ImageIcon(InfoEmployee.class.getResource("/resource/image/manager_teacher.png"))); uiReadIdCard.setFocusable(false); uiReadIdCard.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { uiReadIdCardActionPerformed(e); } }); toolBar.add(uiReadIdCard); } toolBar.addSeparator(); { JButton uiInputFinger = new JButton(""); uiInputFinger.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { uiInputFingerActionPerformed(e); } }); uiInputFinger.setIcon(new ImageIcon(InfoEmployee.class.getResource("/resource/image/finger.png"))); uiInputFinger.setFont(APP_FONT); uiInputFinger.setFocusable(false); toolBar.add(uiInputFinger); } toolBar.addSeparator(); { JButton uiSetSuspend = new JButton("??"); uiSetSuspend.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { uiSetSuspendActionPerformed(e); } }); uiSetSuspend .setIcon(new ImageIcon(InfoEmployee.class.getResource("/resource/image/emp_retire.png"))); uiSetSuspend.setFont(APP_FONT); uiSetSuspend.setFocusable(false); toolBar.add(uiSetSuspend); } } { JPanel panel = new JPanel(); getContentPane().add(panel); panel.setLayout(new MigLayout("", "[]5[grow]25[]5[grow]25[]5[grow]5[102]", "[][][][]")); { JLabel label = new JLabel("?"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); panel.add(label, "cell 0 0"); } { uiId = new LynkTextField(); uiId.setEditable(false); uiId.setForeground(Color.BLUE); panel.add(uiId, "cell 1 0,growx"); } { JLabel label = new JLabel("??"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); panel.add(label, "cell 2 0"); } { uiName = new LynkTextField(); uiName.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { uiNameFocusLost(e); } }); panel.add(uiName, "cell 3 0,growx"); } { JLabel label = new JLabel("?"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); panel.add(label, "cell 4 0"); } { uiNamePy = new LynkTextField(); panel.add(uiNamePy, "cell 5 0,growx"); } { JLabel label = new JLabel("?"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); panel.add(label, "cell 0 1"); } { uiState = new JComboBox<String>(); uiState.setForeground(Color.BLUE); uiState.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { uiStateActionPerformed(e); } }); uiState.setModel(new DefaultComboBoxModel<String>(new String[] { "", Employee.STATE_PROBATION, Employee.STATE_CONTRACT, Employee.STATE_SUSPEND, Employee.STATE_LEAVE, Employee.STATE_RETIRE, Employee.STATE_DELETE })); uiState.setFont(APP_FONT); panel.add(uiState, "cell 1 1,growx"); } { uiInfoTab = new JideTabbedPane(JTabbedPane.TOP); uiInfoTab.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { uiInfoTabStateChanged(e); } }); uiInfoTab.setColorTheme(JideTabbedPane.COLOR_THEME_DEFAULT); uiInfoTab.setFont(APP_FONT); panel.add(uiInfoTab, "cell 0 3 7 1"); { JPanel uiInfoBasic = new JPanel(); uiInfoBasic.setLayout(new MigLayout("", "[473px,grow][307px,grow]", "[grow][289px][149px]")); uiInfoTab.addTab("?", uiInfoBasic); { JPanel uiIdCardPane = new JPanel(); uiIdCardPane.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); uiIdCardPane.setLayout(new MigLayout("", "[]5[grow]10[]", "[][][][][40px:40px:40px,grow]")); uiInfoBasic.add(uiIdCardPane, "cell 0 0,grow"); { JLabel label = new JLabel("??"); uiIdCardPane.add(label, "cell 0 0"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); } { uiIdCard = new LynkTextField(); uiIdCardPane.add(uiIdCard, "cell 1 0,growx"); } { JPanel pane = new JPanel(); uiIdCardPane.add(pane, "cell 2 0 1 5,grow"); pane.setLayout(new MigLayout("insets 0", "[102px:102px:102px]", "[126px:126px:126px]")); { uiPhoto = new ImagePane(); pane.add(uiPhoto, "cell 0 0,grow"); } } // { // JPanel photoPane = new JPanel(); // photoPane.setLayout(new MigLayout("insets 0", "[grow]", "[grow][]")); // uiIdCardPane.add(photoPane, "cell 2 0 2 4,grow"); // { // uiPhoto = new ImagePane(); // photoPane.add(uiPhoto, "cell 0 0,grow"); // } // { // JButton uiReadIdCardDirect = new JButton("??"); // uiReadIdCardDirect.addActionListener(new ActionListener() { // public void actionPerformed(ActionEvent e) { // uiReadIdCardDirectActionPerformed(e); // } // }); // uiReadIdCardDirect.setFont(APP_FONT); // uiReadIdCardDirect.setFocusable(false); // photoPane.add(uiReadIdCardDirect, "cell 0 1,grow"); // } // } { JLabel label = new JLabel(""); uiIdCardPane.add(label, "cell 0 1"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); } { uiBirthday = new LynkTextField(); uiIdCardPane.add(uiBirthday, "cell 1 1,growx"); } { JLabel label = new JLabel(""); uiIdCardPane.add(label, "cell 0 2"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); } { uiAge = new LynkTextField(); uiIdCardPane.add(uiAge, "cell 1 2,growx"); } { JLabel label = new JLabel(""); uiIdCardPane.add(label, "cell 0 3,aligny top"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); } { uiGender = new LynkTextField(); uiIdCardPane.add(uiGender, "cell 1 3,growx,aligny top"); } { JLabel label = new JLabel("??"); label.setFont(APP_FONT); label.setHorizontalAlignment(SwingConstants.RIGHT); uiIdCardPane.add(label, "cell 0 4"); } { JScrollPane scrollPane = new JScrollPane(); uiIdCardPane.add(scrollPane, "cell 1 4,grow"); { uiCensusAddress = new JTextArea(); uiCensusAddress.setWrapStyleWord(true); uiCensusAddress.setLineWrap(true); scrollPane.setViewportView(uiCensusAddress); uiCensusAddress.setFont(APP_FONT); } } } { JPanel uiIdCardPane = new JPanel(); uiIdCardPane.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); uiIdCardPane .setLayout(new MigLayout("", "[]5[grow]25[]5[grow]", "[][][40px:40px:40px,grow]")); uiInfoBasic.add(uiIdCardPane, "cell 0 1,grow"); { JLabel label = new JLabel(""); uiIdCardPane.add(label, "cell 0 0"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); } { uiMarital = new JComboBox<String>(); uiIdCardPane.add(uiMarital, "cell 1 0,growx"); uiMarital.setModel(new DefaultComboBoxModel<String>( new String[] { Employee.MARITAL_YES, Employee.MARITAL_NO })); uiMarital.setFont(APP_FONT); } { JLabel label = new JLabel("?"); uiIdCardPane.add(label, "cell 2 0"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); } { uiContact = new LynkTextField(); uiIdCardPane.add(uiContact, "cell 3 0,growx"); } { JLabel label = new JLabel("?"); uiIdCardPane.add(label, "cell 0 1"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); } { uiCensus = new JComboBox<String>(); uiIdCardPane.add(uiCensus, "cell 1 1,growx"); uiCensus.setModel(new DefaultComboBoxModel<String>( new String[] { Employee.CENSUS_A, Employee.CENSUS_B, Employee.CENSUS_C, Employee.CENSUS_D, Employee.CENSUS_E, Employee.CENSUS_F })); uiCensus.setFont(APP_FONT); } { JLabel label = new JLabel("??"); uiIdCardPane.add(label, "cell 2 1"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); } { uiResidencePermit = new JComboBox<String>(); uiIdCardPane.add(uiResidencePermit, "cell 3 1,growx"); uiResidencePermit .setModel(new DefaultComboBoxModel<String>(new String[] { "", "", "" })); uiResidencePermit.setFont(APP_FONT); } { JLabel label = new JLabel(""); uiIdCardPane.add(label, "cell 0 2"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); } { JScrollPane scrollPane = new JScrollPane(); uiIdCardPane.add(scrollPane, "cell 1 2 3 1,grow"); { uiAddress = new JTextArea(); uiAddress.setWrapStyleWord(true); uiAddress.setLineWrap(true); scrollPane.setViewportView(uiAddress); uiAddress.setFont(APP_FONT); } } } { JPanel uiCompanyPanel = new JPanel(); uiCompanyPanel.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); uiCompanyPanel.setLayout(new MigLayout("", "[]5[grow][]25[]5[grow][]", "[][][][][][][][]")); uiInfoBasic.add(uiCompanyPanel, "cell 0 2,growx,aligny top"); { JLabel label = new JLabel(Employee.SUSPEND_NOTE); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); uiCompanyPanel.add(label, "cell 0 0"); } { uiFactory = new JComboBox<String>(new DefaultComboBoxModel<String>( new String[] { Employee.FACROTY_TC, Employee.FACTORY_SX })); uiFactory.setFont(APP_FONT); uiCompanyPanel.add(uiFactory, "cell 1 0 2 1,growx"); } { JLabel label = new JLabel(""); uiCompanyPanel.add(label, "cell 3 0"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); } { uiDept = new LynkTextField(); uiDept.setEditable(false); uiCompanyPanel.add(uiDept, "cell 4 0,growx"); } { JButton uiChooseDept = new JButton(); uiChooseDept.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { uiChooseDeptActionPerformed(e); } }); uiChooseDept.setIcon(new ImageIcon( InfoEmployee.class.getResource("/resource/image/choose_more.png"))); uiChooseDept.setMargin(new Insets(1, 1, 1, 1)); uiCompanyPanel.add(uiChooseDept, "cell 5 0,growx"); } { JLabel label = new JLabel("?"); uiCompanyPanel.add(label, "cell 0 1"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); } { uiJob = new LynkTextField(); uiJob.setEditable(false); uiCompanyPanel.add(uiJob, "cell 1 1,growx"); } { JButton uiChooseJob = new JButton(); uiChooseJob.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { uiChooseJobActionPerformed(e); } }); uiChooseJob.setIcon(new ImageIcon( InfoEmployee.class.getResource("/resource/image/choose_more.png"))); uiChooseJob.setMargin(new Insets(1, 1, 1, 1)); uiCompanyPanel.add(uiChooseJob, "cell 2 1,growx"); } { JLabel label = new JLabel(Employee.SUSPEND_START); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); uiCompanyPanel.add(label, "cell 3 1"); } { uiDdg = new JComboBox<String>( new DefaultComboBoxModel<>(new String[] { Employee.DDG_N, Employee.DDG_Y })); uiDdg.setFont(APP_FONT); uiCompanyPanel.add(uiDdg, "cell 4 1 2 1,growx"); } { JLabel label = new JLabel(""); uiCompanyPanel.add(label, "cell 0 2"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); } { uiEntryDate = new JDateChooser(); uiCompanyPanel.add(uiEntryDate, "cell 1 2 2 1,growx"); uiEntryDate.setDateFormatString("yyyy-MM-dd"); uiEntryDate.setFont(APP_FONT); uiEntryDate.getJCalendar().setTodayButtonVisible(true); uiEntryDate.addPropertyChangeListener(new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { if ("date".equals(evt.getPropertyName())) { setWorkAge(); } } }); } { JLabel label = new JLabel(""); uiCompanyPanel.add(label, "cell 3 2"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); } { uiWorkAge = new LynkTextField("0"); uiCompanyPanel.add(uiWorkAge, "cell 4 2 2 1,growx"); uiWorkAge.setEditable(false); } { JLabel label = new JLabel("?"); uiCompanyPanel.add(label, "cell 0 3"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); } { uiProbation = new JDateChooser(); uiCompanyPanel.add(uiProbation, "cell 1 3 2 1,growx"); uiProbation.setDateFormatString("yyyy-MM-dd"); uiProbation.setFont(APP_FONT); uiProbation.getJCalendar().setTodayButtonVisible(true); } { JLabel label = new JLabel("??"); uiCompanyPanel.add(label, "cell 3 3"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); } { uiExpiration = new JDateChooser(); uiCompanyPanel.add(uiExpiration, "cell 4 3 2 1,growx"); uiExpiration.setDateFormatString("yyyy-MM-dd"); uiExpiration.setFont(APP_FONT); uiExpiration.getJCalendar().setLeftButtonText(Employee.EXPIRATION_NO); uiExpiration.getJCalendar().setLeftButtonVisible(true); uiExpiration.getJCalendar().setRightButtonText(Employee.EXPIRATION_LONG); uiExpiration.getJCalendar().setRightButtonVisible(true); } { JLabel label = new JLabel(""); uiCompanyPanel.add(label, "cell 0 4"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); } { uiSchool = new LynkTextField(); uiCompanyPanel.add(uiSchool, "cell 1 4 2 1,growx"); } { JLabel label = new JLabel(""); uiCompanyPanel.add(label, "cell 3 4"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); } { uiDegree = new JComboBox<String>(); uiCompanyPanel.add(uiDegree, "cell 4 4 2 1,growx"); uiDegree.setMaximumRowCount(12); uiDegree.setModel(new DefaultComboBoxModel<String>(new String[] { "", Employee.DEGREE_A, Employee.DEGREE_B, Employee.DEGREE_C, Employee.DEGREE_D, Employee.DEGREE_E, Employee.DEGREE_F, Employee.DEGREE_G, Employee.DEGREE_H, Employee.DEGREE_I, Employee.DEGREE_J })); uiDegree.setFont(APP_FONT); } { JLabel label = new JLabel(""); uiCompanyPanel.add(label, "cell 0 5"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); } { uiMajor = new LynkTextField(); uiCompanyPanel.add(uiMajor, "cell 1 5 2 1,growx"); } { JLabel label = new JLabel(""); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); uiCompanyPanel.add(label, "cell 3 5"); } { uiGuide = new LynkTextField(); uiCompanyPanel.add(uiGuide, "cell 4 5 2 1,growx"); } { JLabel label = new JLabel("?"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT_BLOD); uiCompanyPanel.add(label, "cell 0 6"); } { uiPhoneShort = new LynkTextField(); uiPhoneShort.setFont(APP_FONT_BLOD); uiCompanyPanel.add(uiPhoneShort, "cell 1 6 2 1,growx"); } { JLabel label = new JLabel("?"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); uiCompanyPanel.add(label, "cell 3 6"); } { uiPerformance = new LynkTextField(); uiCompanyPanel.add(uiPerformance, "cell 4 6 2 1,growx"); } // { // JLabel label = new JLabel("??"); // label.setHorizontalAlignment(SwingConstants.RIGHT); // label.setFont(APP_FONT); // uiCompanyPanel.add(label, "cell 0 7"); // } // { // uiSuspendEnd = new LynkTextField(); // uiCompanyPanel.add(uiSuspendEnd, "cell 1 7 5 1,growx"); // } } { JPanel panel4 = new JPanel(); panel4.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null)); panel4.setLayout(new MigLayout("", "[]5[grow]", "[][][][grow][grow]")); uiInfoBasic.add(panel4, "cell 1 0 1 3,grow"); { JLabel label = new JLabel("???"); panel4.add(label, "cell 0 0,grow"); label.setFont(APP_FONT); } { uiSocialCard = new LynkTextField(); panel4.add(uiSocialCard, "cell 1 0,grow"); } { JLabel label = new JLabel("?"); panel4.add(label, "cell 0 1,grow"); label.setFont(APP_FONT); } { uiHousingCard = new LynkTextField(); panel4.add(uiHousingCard, "cell 1 1,grow"); } { JLabel label = new JLabel("??"); panel4.add(label, "cell 0 2,grow"); label.setFont(APP_FONT); } { uiBankCard = new LynkTextField(); panel4.add(uiBankCard, "cell 1 2,grow"); } { JLabel label = new JLabel("?"); panel4.add(label, "cell 0 3,growx,aligny top"); label.setFont(APP_FONT); } { JScrollPane scrollPane = new JScrollPane(); panel4.add(scrollPane, "cell 1 3,grow"); uiWorkExperience = new JTextArea(); uiWorkExperience.setFont(APP_FONT); scrollPane.setViewportView(uiWorkExperience); } { JLabel label = new JLabel(""); panel4.add(label, "cell 0 4,growx,aligny top"); label.setFont(APP_FONT); } { JScrollPane scrollPane = new JScrollPane(); panel4.add(scrollPane, "cell 1 4,grow"); { uiNote = new JTextArea(); uiNote.setFont(APP_FONT); scrollPane.setViewportView(uiNote); } } } } { JPanel uiInfoLeave = new JPanel(); uiInfoLeave.setLayout(new MigLayout("", "[]5[150px]25[]5[150px]", "[][][][grow][]")); uiInfoTab.addTab("??", uiInfoLeave); { uiLabelLeaveDate = new JLabel("?"); uiLabelLeaveDate.setFont(APP_FONT); uiInfoLeave.add(uiLabelLeaveDate, "cell 0 0,grow"); } { uiLeaveDate = new JDateChooser(); uiLeaveDate.setDateFormatString("yyyy-MM-dd"); uiLeaveDate.setFont(APP_FONT); uiLeaveDate.getJCalendar().setTodayButtonVisible(true); uiLeaveDate.getJCalendar().setNullDateButtonVisible(true); uiInfoLeave.add(uiLeaveDate, "cell 1 0,growx,aligny top"); } { uiLabelSocialEnd = new JLabel("??"); uiLabelSocialEnd.setFont(APP_FONT); uiInfoLeave.add(uiLabelSocialEnd, "cell 0 1,grow"); } { uiLabelHousingEnd = new JLabel("?"); uiLabelHousingEnd.setFont(APP_FONT); uiInfoLeave.add(uiLabelHousingEnd, "cell 2 1,grow"); } { uiHousingEndDate = new JDateChooser(); uiHousingEndDate.setDateFormatString("yyyy-MM-dd"); uiHousingEndDate.setFont(APP_FONT); uiHousingEndDate.getJCalendar().setLeftButtonText(""); uiHousingEndDate.getJCalendar().setLeftButtonVisible(true); uiHousingEndDate.getJCalendar().setTodayButtonVisible(true); uiHousingEndDate.getJCalendar().setNullDateButtonVisible(true); uiInfoLeave.add(uiHousingEndDate, "cell 3 1,growx,aligny top"); } { uiLabelLeaveType = new JLabel("?"); uiLabelLeaveType.setFont(APP_FONT); uiInfoLeave.add(uiLabelLeaveType, "cell 0 2,grow"); } { uiSocialEndDate = new JDateChooser(); uiSocialEndDate.setDateFormatString("yyyy-MM-dd"); uiSocialEndDate.setFont(APP_FONT); uiSocialEndDate.getJCalendar().setLeftButtonText(""); uiSocialEndDate.getJCalendar().setLeftButtonVisible(true); uiSocialEndDate.getJCalendar().setTodayButtonVisible(true); uiSocialEndDate.getJCalendar().setNullDateButtonVisible(true); uiInfoLeave.add(uiSocialEndDate, "cell 1 1,growx,aligny top"); } { uiLeaveType = new JComboBox<String>(new DefaultComboBoxModel<String>( new String[] { "", Employee.LEAVE_TYPE_A, Employee.LEAVE_TYPE_B, Employee.LEAVE_TYPE_C, Employee.LEAVE_TYPE_D, Employee.LEAVE_TYPE_E, Employee.LEAVE_TYPE_F, Employee.LEAVE_TYPE_G, Employee.LEAVE_TYPE_H })); uiLeaveType.setMaximumRowCount(10); uiLeaveType.setFont(APP_FONT); uiInfoLeave.add(uiLeaveType, "cell 1 2 3 1,grow"); } { uiLabelLeaveReason = new JLabel("?"); uiLabelLeaveReason.setFont(APP_FONT); uiInfoLeave.add(uiLabelLeaveReason, "cell 0 3,growx,aligny top"); } { JScrollPane scrollPane_2 = new JScrollPane(); uiInfoLeave.add(scrollPane_2, "cell 1 3 3 1,grow"); { uiLeaveReason = new JTextArea(); scrollPane_2.setViewportView(uiLeaveReason); uiLeaveReason.setFont(APP_FONT); } } { JLabel label = new JLabel("??"); label.setHorizontalAlignment(SwingConstants.RIGHT); label.setFont(APP_FONT); uiInfoLeave.add(label, "cell 0 4"); } { uiTimeCardLeaveCertify = new LynkTextField(); uiTimeCardLeaveCertify.setEditable(false); uiInfoLeave.add(uiTimeCardLeaveCertify, "cell 1 4 2 1,growx"); } { JButton uiPrintLeaveCertify = new JButton("???"); uiPrintLeaveCertify.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { uiPrintLeaveCertifyActionPerformed(e); } }); uiPrintLeaveCertify.setToolTipText("???!"); uiPrintLeaveCertify.setFont(APP_FONT); uiPrintLeaveCertify.setFocusable(false); uiInfoLeave.add(uiPrintLeaveCertify, "cell 3 4,alignx right"); } } { JPanel uiInfoSuspendHistory = new JPanel(); uiInfoSuspendHistory.setLayout(new BorderLayout(0, 0)); uiInfoTab.addTab("???", uiInfoSuspendHistory); { JScrollPane scrollPane = new JScrollPane(); uiInfoSuspendHistory.add(scrollPane, BorderLayout.CENTER); { suspendModel = new EmployeeSuspendModel(); uiEmpSuspend = new LynkTable(suspendModel); uiEmpSuspend.addHighlighter(UtilsClient.createAlignHighlighter()); uiEmpSuspend.setAutoResizeMode(LynkTable.AUTO_RESIZE_ALL_COLUMNS); scrollPane.setRowHeaderView(new TableRowHead(uiEmpSuspend)); scrollPane.setViewportView(uiEmpSuspend); } } } { JPanel uiInfoEmpHistory = new JPanel(); uiInfoEmpHistory.setLayout(new BorderLayout(0, 0)); uiInfoTab.addTab("?", uiInfoEmpHistory); { JPanel pane = new JPanel(); pane.setLayout(new MigLayout("", "[][][][100px:100px:100px][]", "[]")); uiInfoEmpHistory.add(pane, BorderLayout.NORTH); { JLabel label = new JLabel(""); label.setFont(APP_FONT); pane.add(label, "cell 0 0"); } { uiHistoryType = new JComboBox<String>(new DefaultComboBoxModel<>( new String[] { "", PraisePunish.TYPE_A, PraisePunish.TYPE_B, PraisePunish.TYPE_C, PraisePunish.TYPE_D, PraisePunish.TYPE_E, PraisePunish.TYPE_F, PraisePunish.TYPE_G, PraisePunish.TYPE_H })); uiHistoryType.setFont(APP_FONT); pane.add(uiHistoryType, "cell 1 0"); } { JLabel label = new JLabel("?"); label.setFont(APP_FONT); pane.add(label, "cell 2 0"); } { uiHistoryOperator = new LynkTextField(); pane.add(uiHistoryOperator, "cell 3 0,growx"); } { JButton uiRefresh = new JButton(""); uiRefresh.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { uiRefreshActionPerformed(e); } }); uiRefresh.setIcon( new ImageIcon(InfoEmployee.class.getResource("/resource/image/refresh.png"))); uiRefresh.setFont(APP_FONT); uiRefresh.setFocusable(false); pane.add(uiRefresh, "cell 4 0"); } } { JScrollPane scrollPane = new JScrollPane(); uiInfoEmpHistory.add(scrollPane, BorderLayout.CENTER); { historyModel = new EmployeeHistoryModel(); uiEmployeeHistory = new LynkTable(historyModel); uiEmployeeHistory.setColumnSize(70, 540, 50, 130, 90); scrollPane.setViewportView(uiEmployeeHistory); scrollPane.setRowHeaderView(new TableRowHead(uiEmployeeHistory)); } } } { JPanel uiInfoJobAdjustment = new JPanel(); uiInfoJobAdjustment.setLayout(new BorderLayout(0, 0)); uiInfoTab.addTab("?", uiInfoJobAdjustment); { JToolBar toolBar = new JToolBar(); toolBar.setFloatable(false); uiInfoJobAdjustment.add(toolBar, BorderLayout.NORTH); { { JButton uiAddJobAdjust = new JButton("?"); uiAddJobAdjust.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { uiAddJobAdjustActionPerformed(e); } }); uiAddJobAdjust.setIcon( new ImageIcon(InfoEmployee.class.getResource("/resource/image/add.png"))); uiAddJobAdjust.setFont(APP_FONT); toolBar.add(uiAddJobAdjust); } } } { JScrollPane scrollPane = new JScrollPane(); uiInfoJobAdjustment.add(scrollPane, BorderLayout.CENTER); { jobAdjustmentModel = new JobAdjustmentModel(); uiJobAdjustment = new LynkTable(jobAdjustmentModel); uiJobAdjustment.setColumnSize(50, 100, 100, 100, 100, 100, 80, 100, 150); scrollPane.setRowHeaderView(new TableRowHead(uiJobAdjustment)); scrollPane.setViewportView(uiJobAdjustment); } } } { JPanel uiInfoPraisePunish = new JPanel(); uiInfoTab.addTab("", uiInfoPraisePunish); uiInfoPraisePunish.setLayout( new MigLayout("", "[]10[grow]30[]10[120]5[]5[120]20[]20[][grow]", "[][grow]")); { uiPraisePunishDateStart = new JDateChooser(); uiPraisePunishDateStart.setFont(APP_FONT); uiPraisePunishDateStart.setDateFormatString("yyyy-MM-dd"); uiInfoPraisePunish.add(uiPraisePunishDateStart, "cell 3 0,growx"); } { uiPraisePunishDateEnd = new JDateChooser(); uiPraisePunishDateEnd.setFont(APP_FONT); uiPraisePunishDateEnd.setDateFormatString("yyyy-MM-dd"); uiInfoPraisePunish.add(uiPraisePunishDateEnd, "cell 5 0,growx"); } JButton uiAddPraisePunish = new JButton(""); uiAddPraisePunish.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { uiAddPraisePunishActionPerformed(e); } }); { JButton uiFindPraisePunish = new JButton(""); uiFindPraisePunish.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { uiFindPraisePunishActionPerformed(e); } }); { JLabel label = new JLabel(""); label.setFont(APP_FONT); uiInfoPraisePunish.add(label, "cell 0 0,alignx trailing"); } { uiPraisePunishType = new JComboBox<String>( new DefaultComboBoxModel<String>(new String[] { "", PraisePunish.TYPE_A, PraisePunish.TYPE_B, PraisePunish.TYPE_C, PraisePunish.TYPE_D, PraisePunish.TYPE_E, PraisePunish.TYPE_F, PraisePunish.TYPE_G })); uiPraisePunishType.setEditable(true); uiPraisePunishType.setFont(APP_FONT); uiInfoPraisePunish.add(uiPraisePunishType, "cell 1 0,growx"); } { JLabel label = new JLabel(""); label.setFont(APP_FONT); uiInfoPraisePunish.add(label, "cell 2 0"); } { JLabel label = new JLabel(""); label.setFont(APP_FONT); uiInfoPraisePunish.add(label, "cell 4 0"); } uiFindPraisePunish.setFocusable(false); uiFindPraisePunish.setIcon( new ImageIcon(InfoEmployee.class.getResource("/resource/image/refresh.png"))); uiFindPraisePunish.setFont(APP_FONT); uiInfoPraisePunish.add(uiFindPraisePunish, "cell 6 0"); } uiAddPraisePunish .setIcon(new ImageIcon(InfoEmployee.class.getResource("/resource/image/add.png"))); uiAddPraisePunish.setFont(APP_FONT); uiAddPraisePunish.setFocusable(false); uiInfoPraisePunish.add(uiAddPraisePunish, "cell 7 0"); JScrollPane scrollPane = new JScrollPane(); uiInfoPraisePunish.add(scrollPane, "cell 0 1 9 1,grow"); { praisePunishModel = new PraisePunishModel( new String[] { PraisePunish.COLUMN_TYPE, PraisePunish.COLUMN_ACTION, PraisePunish.COLUMN_ACTION_DATE, PraisePunish.COLUMN_DEAL, PraisePunish.COLUMN_DEAL_DATE, PraisePunish.COLUMN_NOTE }); uiPraisePunish = new LynkTable(praisePunishModel); uiPraisePunish.setColumnVisible( new String[] { PraisePunish.COLUMN_TYPE, PraisePunish.COLUMN_ACTION, PraisePunish.COLUMN_ACTION_DATE, PraisePunish.COLUMN_DEAL, PraisePunish.COLUMN_DEAL_DATE, PraisePunish.COLUMN_NOTE }); uiPraisePunish.setDefaultRenderer(Object.class, new PraisePunishColorRenderer()); uiPraisePunish.setMouseDoubleClick(new MouseDoubleClick() { @Override public void doubleClick(int index) { if (index != -1) { index = uiPraisePunish.convertRowIndexToModel(index); PraisePunish pp = praisePunishModel.getPp(index); pp = InfoPraisePunish.showdialog(InfoEmployee.this, pp, null); if (pp != null) { praisePunishModel.updatePp(pp); } } } }); scrollPane.setViewportView(uiPraisePunish); scrollPane.setRowHeaderView(new TableRowHead(uiPraisePunish)); } } { JPanel uiPanelVacation = new JPanel(); uiPanelVacation.setLayout(new BorderLayout()); uiInfoTab.addTab("?", uiPanelVacation); { JToolBar uiVacationToolBar = new JToolBar(); uiVacationToolBar.setFloatable(false); uiPanelVacation.add(uiVacationToolBar, BorderLayout.NORTH); { JButton uiVacationRefresh = new JButton(""); uiVacationRefresh.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { uiVacationRefreshActionPerformed(e); } }); uiVacationRefresh.setIcon( new ImageIcon(InfoEmployee.class.getResource("/resource/image/refresh.png"))); uiVacationRefresh.setFocusable(false); uiVacationRefresh.setFont(APP_FONT); uiVacationToolBar.add(uiVacationRefresh); } uiVacationToolBar.addSeparator(); { uiVacationHistoryAdd = new JButton(""); uiVacationHistoryAdd.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { uiVacationAddActionPerformed(e); } }); uiVacationHistoryAdd.setIcon( new ImageIcon(InfoEmployee.class.getResource("/resource/image/add.png"))); uiVacationHistoryAdd.setFocusable(false); uiVacationHistoryAdd.setFont(APP_FONT); uiVacationToolBar.add(uiVacationHistoryAdd); } uiVacationToolBar.addSeparator(); { JButton uiEndLastLeft = new JButton(""); uiEndLastLeft.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { uiEndLastLeftActionPerformed(e); } }); uiEndLastLeft.setIcon( new ImageIcon(InfoEmployee.class.getResource("/resource/image/add.png"))); uiEndLastLeft.setFocusable(false); uiEndLastLeft.setFont(APP_FONT); uiVacationToolBar.add(uiEndLastLeft); } } { JPanel uiPanelVacationInfo = new JPanel(); uiPanelVacation.add(uiPanelVacationInfo, BorderLayout.CENTER); uiPanelVacationInfo.setLayout(new MigLayout("", "[grow]", "[][grow]")); JPanel paneAv = new JPanel(); uiPanelVacationInfo.add(paneAv, "cell 0 0,grow"); paneAv.setLayout(new MigLayout("", "[][grow]50[][grow]", "[][][]")); { uiVacationStartEnd = new JLabel("Time"); uiVacationStartEnd.setHorizontalAlignment(SwingConstants.CENTER); paneAv.add(uiVacationStartEnd, "cell 0 0 4 1,growx"); uiVacationStartEnd.setForeground(Color.BLUE); uiVacationStartEnd.setFont(APP_FONT.deriveFont(16f)); } { JLabel labe = new JLabel(":"); paneAv.add(labe, "cell 0 1"); labe.setFont(APP_FONT.deriveFont(16f)); } { uiLastTotal = new JLabel(""); paneAv.add(uiLastTotal, "cell 1 1,alignx left"); uiLastTotal.setForeground(Color.BLUE); uiLastTotal.setFont(APP_FONT.deriveFont(16f)); } { JLabel labe = new JLabel(":"); paneAv.add(labe, "cell 2 1"); labe.setFont(APP_FONT.deriveFont(16f)); } { uiLastLeft = new JLabel(""); paneAv.add(uiLastLeft, "cell 3 1,alignx left"); uiLastLeft.setForeground(Color.BLUE); uiLastLeft.setFont(APP_FONT.deriveFont(16f)); } { JLabel labe = new JLabel(":"); paneAv.add(labe, "cell 0 2"); labe.setFont(APP_FONT.deriveFont(16f)); } { uiCurrentTotal = new JLabel(""); paneAv.add(uiCurrentTotal, "cell 1 2,alignx left"); uiCurrentTotal.setForeground(Color.BLUE); uiCurrentTotal.setFont(APP_FONT.deriveFont(16f)); } { JLabel labe = new JLabel("?:"); paneAv.add(labe, "cell 2 2"); labe.setFont(APP_FONT.deriveFont(16f)); } { uiLeftHours = new JLabel(""); paneAv.add(uiLeftHours, "cell 3 2,alignx left"); uiLeftHours.setForeground(Color.BLUE); uiLeftHours.setFont(APP_FONT.deriveFont(16f)); } JScrollPane scrollPane = new JScrollPane(); uiPanelVacationInfo.add(scrollPane, "cell 0 1,grow"); { attendanceVacationModel = new AttendanceVacationHistoryModel(); uiAttendanceVacationHistory = new LynkTable(attendanceVacationModel); uiAttendanceVacationHistory.setAutoResizeMode(LynkTable.AUTO_RESIZE_ALL_COLUMNS); scrollPane.setViewportView(uiAttendanceVacationHistory); scrollPane.setRowHeaderView(new TableRowHead(uiAttendanceVacationHistory)); } } } } } }
From source file:be.ugent.maf.cellmissy.gui.controller.analysis.singlecell.SingleCellStatisticsController.java
/** * Show Summary Statistics in correspondent table * * @param analysisGroup//w w w . ja v a 2s. c o m */ private void showSummary(SingleCellAnalysisGroup singleCellAnalysisGroup) { singleCellAnalysisController.getAnalysisPanel().getCurrentGroupName() .setText(singleCellAnalysisGroup.getGroupName()); // set model and cell renderer for statistics summary table SingleCellStatSummaryTableModel statisticalSummaryTableModel = new SingleCellStatSummaryTableModel( singleCellAnalysisGroup); JTable statisticalSummaryTable = singleCellAnalysisController.getAnalysisPanel().getStatTable(); statisticalSummaryTable.setModel(statisticalSummaryTableModel); for (int i = 1; i < statisticalSummaryTable.getColumnCount(); i++) { statisticalSummaryTable.getColumnModel().getColumn(i) .setCellRenderer(new FormatRenderer(new DecimalFormat("#.####"), SwingConstants.CENTER)); } statisticalSummaryTable.getTableHeader().setDefaultRenderer(new TableHeaderRenderer(SwingConstants.RIGHT)); }
From source file:de.tor.tribes.ui.windows.ClockFrame.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.//ww w .ja v a2 s . com */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; jSpinner1 = new javax.swing.JSpinner(); jActivateTimerButton = new javax.swing.JToggleButton(); jLabel1 = new javax.swing.JLabel(); jPanel1 = new javax.swing.JPanel(); jPanel2 = new javax.swing.JPanel(); jCheckBox1 = new javax.swing.JCheckBox(); jPanel3 = new javax.swing.JPanel(); jComboBox1 = new javax.swing.JComboBox(); dateTimeField1 = new de.tor.tribes.ui.components.DateTimeField(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jTestAlert = new javax.swing.JButton(); jButton1 = new javax.swing.JButton(); jLabel4 = new javax.swing.JLabel(); jTimerName = new org.jdesktop.swingx.JXTextField(); jScrollPane1 = new javax.swing.JScrollPane(); jTimerContainer = new javax.swing.JPanel(); jButton2 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton(); jSpinner1.setModel( new javax.swing.SpinnerDateModel(new java.util.Date(), null, null, java.util.Calendar.MILLISECOND)); jActivateTimerButton.setBackground(new java.awt.Color(239, 235, 223)); jActivateTimerButton.setText("Aktivieren"); jActivateTimerButton.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { fireActivateTimerEvent(evt); } }); setTitle("Uhr"); setMinimumSize(new java.awt.Dimension(280, 75)); getContentPane().setLayout(new java.awt.GridBagLayout()); jLabel1.setBackground(new java.awt.Color(239, 235, 223)); jLabel1.setFont(new java.awt.Font("Verdana", 0, 36)); // NOI18N jLabel1.setText("Lade..."); jLabel1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED)); jLabel1.setOpaque(true); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; getContentPane().add(jLabel1, gridBagConstraints); jPanel1.setMinimumSize(new java.awt.Dimension(100, 20)); jPanel1.setPreferredSize(new java.awt.Dimension(279, 20)); jPanel1.setLayout(new java.awt.BorderLayout()); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; getContentPane().add(jPanel1, gridBagConstraints); jPanel2.setLayout(new java.awt.BorderLayout()); jCheckBox1.setText("Immer im Vordergrund"); jCheckBox1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jCheckBox1.setMargin(new java.awt.Insets(5, 5, 5, 5)); jCheckBox1.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { fireAlwaysOnTopChangedEvent(evt); } }); jPanel2.add(jCheckBox1, java.awt.BorderLayout.SOUTH); jPanel3.setLayout(new java.awt.GridBagLayout()); jComboBox1.setModel( new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jPanel3.add(jComboBox1, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(10, 5, 5, 5); jPanel3.add(dateTimeField1, gridBagConstraints); jLabel2.setText("Zeit"); jLabel2.setMaximumSize(new java.awt.Dimension(80, 14)); jLabel2.setMinimumSize(new java.awt.Dimension(80, 14)); jLabel2.setPreferredSize(new java.awt.Dimension(80, 14)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jPanel3.add(jLabel2, gridBagConstraints); jLabel3.setText("Sound"); jLabel3.setMaximumSize(new java.awt.Dimension(80, 14)); jLabel3.setMinimumSize(new java.awt.Dimension(80, 14)); jLabel3.setPreferredSize(new java.awt.Dimension(80, 14)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jPanel3.add(jLabel3, gridBagConstraints); jTestAlert.setText("Testen"); jTestAlert.setMaximumSize(new java.awt.Dimension(81, 23)); jTestAlert.setMinimumSize(new java.awt.Dimension(81, 23)); jTestAlert.setPreferredSize(new java.awt.Dimension(81, 23)); jTestAlert.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent evt) { fireTestSoundEvent(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jPanel3.add(jTestAlert, gridBagConstraints); jButton1.setText("Timer erstellen"); jButton1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent evt) { fireCreateTimer(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(10, 5, 5, 5); jPanel3.add(jButton1, gridBagConstraints); jLabel4.setText("Name"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(10, 5, 5, 5); jPanel3.add(jLabel4, gridBagConstraints); jTimerName.setPrompt("Bitte Timername eingeben"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(10, 5, 5, 5); jPanel3.add(jTimerName, gridBagConstraints); jPanel2.add(jPanel3, java.awt.BorderLayout.CENTER); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; getContentPane().add(jPanel2, gridBagConstraints); jScrollPane1.setBorder(javax.swing.BorderFactory.createTitledBorder("Aktive Timer")); jScrollPane1.setMinimumSize(new java.awt.Dimension(246, 150)); jScrollPane1.setPreferredSize(new java.awt.Dimension(246, 150)); jTimerContainer.setLayout(new java.awt.GridLayout(3, 3, 5, 5)); jScrollPane1.setViewportView(jTimerContainer); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 3; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weighty = 1.0; getContentPane().add(jScrollPane1, gridBagConstraints); jButton2.setText("Alle Lschen"); jButton2.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent evt) { fireRemoveAllTimersEvent(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; getContentPane().add(jButton2, gridBagConstraints); jButton3.setText("Auswahl lschen"); jButton3.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent evt) { fireRemoveSelectedTimersEvent(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; getContentPane().add(jButton3, gridBagConstraints); pack(); }
From source file:jchrest.gui.VisualSearchPane.java
private JPanel recallResultsPanel() { _recallSceneLabel = new JLabel("RECALLED SCENE"); //TODO: fix this when perceiver functionality working correctly. // _recalledSceneDisplay = new SceneDisplay (new Scene ( // "empty", // _scenes.get(0).getWidth(), // _scenes.get(0).getHeight(), // null//from www .j a v a 2 s .c o m // )); _precision = new JLabel(""); _recall = new JLabel(""); _omission = new JLabel(""); _commission = new JLabel(""); JPanel panel = new JPanel(); panel.setLayout(new BorderLayout()); JPanel statistics = new JPanel(); // Note: GridLayout used because it keeps a fixed size for the // right-hand side, whereas SpringLayout dynamically changes. statistics.setLayout(new GridLayout(4, 2)); statistics.add(new JLabel("Precision: ", SwingConstants.RIGHT)); statistics.add(_precision); statistics.add(new JLabel("Recall: ", SwingConstants.RIGHT)); statistics.add(_recall); statistics.add(new JLabel("Errors of omission: ", SwingConstants.RIGHT)); statistics.add(_omission); statistics.add(new JLabel("Errors of commission: ", SwingConstants.RIGHT)); statistics.add(_commission); // TODO: there must be a better solution to stop the statistics panel spreading out JPanel statisticsPanel = new JPanel(); statisticsPanel.setLayout(new BorderLayout()); statisticsPanel.add(statistics, BorderLayout.NORTH); panel.add(_recallSceneLabel, BorderLayout.NORTH); panel.add(_recalledSceneDisplay); panel.add(statisticsPanel, BorderLayout.EAST); return panel; }
From source file:edu.harvard.i2b2.query.ui.TopPanel.java
/** * This method is called from within the constructor to initialize the form. *//*from w ww. java 2 s . c om*/ private void initComponents() { jAnalysisLabel = new javax.swing.JLabel(); jNameLabel = new javax.swing.JLabel(); jSetSizeLabel = new javax.swing.JLabel(); jNameTextField = new javax.swing.JTextField(); jSetSizeFiled = new javax.swing.JLabel(); jDeleteButton = new javax.swing.JButton(); jScrollPane1 = new ConceptTreePanel("Group 1", this); jRunQueryButton = new javax.swing.JButton(); jCancelButton = new javax.swing.JButton(); jClearGroupsButton = new javax.swing.JButton(); jScrollPane2 = new ConceptTreePanel("Group 2", this); jScrollPane3 = new ConceptTreePanel("Group 3", this); jScrollPane4 = new javax.swing.JScrollPane(); jPanel1 = new javax.swing.JPanel(); // jVisitComboBox = new javax.swing.JComboBox(); jAndOrLabel1 = new javax.swing.JLabel(); jAndOrLabel2 = new javax.swing.JLabel(); jMorePanelsButton = new javax.swing.JButton(); jWorkflowToolBar = new javax.swing.JToolBar(); // jTimelineToggleButton = new javax.swing.JToggleButton(); jPatientCountToggleButton = new javax.swing.JToggleButton(); // jPatientSetToggleButton = new javax.swing.JToggleButton(); jToolbarPanel = new javax.swing.JPanel(); jQueryNamePanel = new javax.swing.JPanel(); // jOptionsScrollPane = new javax.swing.JScrollPane(); jOptionsPanel = new AnalysisPanel(); jShowTimelineCheckBox = new javax.swing.JCheckBox(); jGetAllPatientsCheckBox = new javax.swing.JCheckBox(); // jGetPatientCountCheckBox = new javax.swing.JCheckBox(); // jGetPatientSetCheckBox = new javax.swing.JCheckBox(); setLayout(null); // jScrollPane4.setHorizontalScrollBarPolicy(javax.swing. // ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); jPanel1.setLayout(null); jPanel1.add(jScrollPane1); jScrollPane1.setBounds(0, 0, 180, 200); jPanel1.add(jScrollPane2); jScrollPane2.setBounds(185, 0, 180, 200); jPanel1.add(jScrollPane3); jScrollPane3.setBounds(370, 0, 180, 200); // jAndOrLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER) // ; jAndOrLabel1.setText("and"); // jAndOrLabel1.setBorder(javax.swing.BorderFactory.createEtchedBorder()) // ; // jPanel1.add(jAndOrLabel1); // jAndOrLabel1.setBounds(190, 90, 30, 18); // jAndOrLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER) // ; // jAndOrLabel2.setText("and"); // jAndOrLabel2.setBorder(javax.swing.BorderFactory.createEtchedBorder()) // ; // jPanel1.add(jAndOrLabel2); // jAndOrLabel2.setBounds(410, 90, 30, 18); jQueryNamePanel.setLayout(null); jQueryNamePanel.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jNameLabel.setText(" Query Name: "); jNameLabel.setToolTipText("You may drag this item to workplace to save the query definition"); jNameLabel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jNameLabel.setBounds(2, 2, 70, 23); add(jNameLabel); // jQueryNamePanel.add(jNameLabel); jNameLabel.setTransferHandler(new NameLabelTextHandler()); jNameLabel.addMouseListener(new DragMouseAdapter()); jNameLabel.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { public void mouseMoved(java.awt.event.MouseEvent evt) { jNameLabelMouseMoved(evt); } }); jNameLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseExited(java.awt.event.MouseEvent evt) { jNameLabelMouseExited(evt); } }); jNameTextField.setText(""); jNameTextField.setBounds(95, 10, 370, 20); jNameTextField.setEditable(false); jNameTextField.setDragEnabled(true); jNameTextField.setTransferHandler(new TransferHandler("Text")); // jQueryNamePanel.add(jNameTextField); // add(jNameTextField); // add(jQueryNamePanel); // jQueryNamePanel.setBounds(5, 5, 400, 50); jClearGroupsButton.setFont(new java.awt.Font("Tahoma", 1, 10)); jClearGroupsButton.setText("X"); jClearGroupsButton.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); jClearGroupsButton.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT); jClearGroupsButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); jClearGroupsButton.setToolTipText("Reset all panels"); if (System.getProperty("os.name").toLowerCase().indexOf("mac") > -1) { jClearGroupsButton.setMargin(new java.awt.Insets(-10, -15, -10, -20)); } jClearGroupsButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jClearGroupsButtonActionPerformed(evt); } }); jClearGroupsButton.setBounds(600, 10, 30, 20); add(jClearGroupsButton); jAnalysisLabel.setText("Analysis Types"); // jAnalysisLabel.setBackground(Color.WHITE); // jAnalysisLabel.setOpaque(true); jAnalysisLabel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jAnalysisLabel.setBounds(2, 2, 70, 23); jAnalysisLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jAnalysisLabel.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); add(jAnalysisLabel); jPanel1.setPreferredSize(new Dimension(700, 150)); jScrollPane4.setViewportView(jPanel1); add(jScrollPane4); jScrollPane4.setBounds(20, 35, 635, 220); jScrollPane4.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); jScrollPane4.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); // jScrollPane4.setBorder(javax.swing.BorderFactory // .createLineBorder(new java.awt.Color(0, 0, 0))); jCancelButton.setText("Cancel"); jCancelButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCancelButtonActionPerformed(evt); } }); // add(jCancelButton); // jCancelButton.setBounds(20, 255, 90, 23); // jCancelButton.setFont(new Font("Tahoma", Font.PLAIN, 10)); jGetAllPatientsCheckBox.setText("Get Everyone"); jGetAllPatientsCheckBox.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); // jGetAllPatientsCheckBox // .setBorder(new javax.swing.border.SoftBevelBorder( // javax.swing.border.BevelBorder.RAISED)); jGetAllPatientsCheckBox.setBorderPainted(true); jGetAllPatientsCheckBox.setContentAreaFilled(false); jGetAllPatientsCheckBox.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jGetAllPatientsCheckBox.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); jGetAllPatientsCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); jGetAllPatientsCheckBox.setToolTipText("Get all the patients in datamart"); add(jGetAllPatientsCheckBox); jGetAllPatientsCheckBox.setBounds(5, 255, 110, 15); jGetAllPatientsCheckBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jGetAllPatientsCheckBoxActionPerformed(evt); } }); jRunQueryButton.setText("Run Query Above"); jRunQueryButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jRunQueryButtonActionPerformed(evt); } }); add(jRunQueryButton); jRunQueryButton.setBounds(100, 255, 625, 23); jSetSizeLabel.setText(" Patient(s) returned:"); add(jSetSizeLabel); jSetSizeLabel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jSetSizeLabel.setBounds(20, 275, 70, 23); // jSetSizeFiled.setText(" subjects"); // jSetSizeFiled.setEditable(false); // jSetSizeFiled.setHorizontalAlignment(SwingConstants.LEFT); // add(jSetSizeFiled); // jSetSizeLabel.setBounds(20, 275, 70, 23); jToolbarPanel.setLayout(new java.awt.BorderLayout()); // jWorkflowToolBar.setRollover(true); // jWorkflowToolBar.setInheritsPopupMenu(true); // jTimelineToggleButton // .setIcon(new javax.swing.ImageIcon( // "C:\\Documents and Settings\\wp066\\My Documents\\icons\\wb16.gif")); // /jTimelineToggleButton.setText("Show TimeLine"); // jTimelineToggleButton.setFocusPainted(false); // jWorkflowToolBar.add(jTimelineToggleButton); jPatientCountToggleButton.setIcon( new javax.swing.ImageIcon("C:\\Documents and Settings\\wp066\\My Documents\\icons\\wb16.gif")); jPatientCountToggleButton.setText("Get Patient Count"); jPatientCountToggleButton.setFocusPainted(false); jWorkflowToolBar.add(jPatientCountToggleButton); // jPatientSetToggleButton // .setIcon(new javax.swing.ImageIcon( // "C:\\Documents and Settings\\wp066\\My Documents\\icons\\wb16.gif")); // jPatientSetToggleButton.setText("Get Patient Set"); // jPatientSetToggleButton.setFocusPainted(false); // jWorkflowToolBar.add(jPatientSetToggleButton); jWorkflowToolBar.setPreferredSize(new Dimension(380, 40)); jToolbarPanel.add(jWorkflowToolBar, java.awt.BorderLayout.PAGE_START); jToolbarPanel.add(jWorkflowToolBar, java.awt.BorderLayout.CENTER); // add(jToolbarPanel); jToolbarPanel.setBounds(20, 130, 240, 23); jMorePanelsButton.setText("<html><center>Add<br>" + "<left>Group"); jMorePanelsButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMorePanelsButtonActionPerformed(evt); } }); // add(jMorePanelsButton); // jMorePanelsButton.setBounds(655, 35, 60, 220); jPanel1.add(jMorePanelsButton); jMorePanelsButton.setBounds(550, 0, 60, 200); // jOptionsPanel.setLayout(null); // jOptionsScrollPane.setBorder(javax.swing.BorderFactory // .createEtchedBorder()); // jOptionsPanel.setPreferredSize(new java.awt.Dimension(100, 100)); jShowTimelineCheckBox.setText("Timeline"); jShowTimelineCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); jShowTimelineCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); jShowTimelineCheckBox.setToolTipText("Get the patient set and display it in timeline view"); // jOptionsPanel.add(jShowTimelineCheckBox); jShowTimelineCheckBox.setBounds(5, 20, 110, 15); // jGetPatientCountCheckBox.setText("Patient Count"); // jGetPatientCountCheckBox.setBorder(javax.swing.BorderFactory // .createEmptyBorder(0, 0, 0, 0)); // jGetPatientCountCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); // jGetPatientCountCheckBox.setToolTipText("Get the patient count XML"); // jOptionsPanel.add(jGetPatientCountCheckBox); // jGetPatientCountCheckBox.setBounds(5, 50, 110, 15); // jGetPatientSetCheckBox.setText("Patient Set"); // jGetPatientSetCheckBox.setBorder(javax.swing.BorderFactory // .createEmptyBorder(0, 0, 0, 0)); // jGetPatientSetCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); // jOptionsPanel.add(jGetPatientSetCheckBox); // jGetPatientSetCheckBox.setBounds(10, 80, 80, 15); // jOptionsScrollPane.setViewportView(jOptionsPanel); add(jOptionsPanel); jOptionsPanel.setBounds(500, 30, 120, 190); /* * jDeleteButton.setText("Delete"); jDeleteButton.addActionListener(new * java.awt.event.ActionListener() { public void * actionPerformed(java.awt.event.ActionEvent evt) { * jDeleteButtonActionPerformed(evt); } }); * * jVisitComboBox.setModel(new javax.swing.DefaultComboBoxModel(new * String[] { "Groups don't have to occur in the same visit", "Groups * must all occur in the same visit" })); add(jVisitComboBox); * jVisitComboBox.setBounds(20, 40, 240, 22); * * //add(jDeleteButton); //jDeleteButton.setBounds(20, 10, 65, 23); * * add(jScrollPane1); jScrollPane1.setBounds(20, 70, 170, 320); * * jRunQueryButton.setText("Run Query"); * jRunQueryButton.addActionListener(new java.awt.event.ActionListener() * { public void actionPerformed(java.awt.event.ActionEvent evt) { * jRunQueryButtonActionPerformed(evt); } }); * * add(jRunQueryButton); jRunQueryButton.setBounds(20, 10, 87, 23); * * jCancelButton.setText("Remove All"); * jCancelButton.addActionListener(new java.awt.event.ActionListener() { * public void actionPerformed(java.awt.event.ActionEvent evt) { * jRemoveAllButtonActionPerformed(evt); } }); * * add(jCancelButton); jCancelButton.setBounds(115, 10, 90, 23); * * //jScrollPane4.setHorizontalScrollBarPolicy(javax.swing. * ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); * jPanel1.setLayout(null); * jScrollPane4.getHorizontalScrollBar().setUnitIncrement(20); * //jPanel1.setVisible(false); * * //jScrollPane1.setToolTipText("scrollpane 1"); * jPanel1.add(jScrollPane1); jScrollPane1.setBounds(0, 0, 170, 350); * * jPanel1.add(jScrollPane2); jScrollPane2.setBounds(210, 0, 170, 350); */ jAndOrLabel1.setBackground(new java.awt.Color(255, 255, 255)); jAndOrLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jAndOrLabel1.setText("and"); jAndOrLabel1.setToolTipText("Click to change the relationship"); jAndOrLabel1.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jAndOrLabel1.addMouseListener(new java.awt.event.MouseAdapter() { @Override public void mouseClicked(java.awt.event.MouseEvent evt) { jAndOrLabel1MouseClicked(evt); } }); // jPanel1.add(jAndOrLabel1); jAndOrLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jAndOrLabel2.setText("and"); jAndOrLabel2.setToolTipText("Click to change the relationship"); jAndOrLabel2.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jAndOrLabel2.addMouseListener(new java.awt.event.MouseAdapter() { @Override public void mouseClicked(java.awt.event.MouseEvent evt) { jAndOrLabel2MouseClicked(evt); } }); // jPanel1.add(jAndOrLabel2); // jTree1.addTreeWillExpandListener(this); // jTree1.addTreeExpansionListener(this); // jScrollPane1.setViewportView(new QueryConceptTreePanel("Group 1")); // jScrollPane1.setToolTipText("Double click on a folder to view the // items inside"); // jTree2.addTreeExpansionListener(this); // jScrollPane2.setViewportView(new QueryConceptTreePanel("Group 2")); // jTree3.addTreeExpansionListener(this); // treepanel = new QueryConceptTreePanel("", this); // jScrollPane3.setViewportView(new QueryConceptTreePanel("Group 3")); // jSlider1.setMajorTickSpacing(20); /* * jSlider1.setPaintTicks(true); jSlider1.setValue(0); * jSlider1.setMinorTickSpacing(10); jSlider1.setToolTipText("Slider on * left is more Sensitive Query, " + "on right is more Specific"); * add(jSlider1); jSlider1.setBounds(380, 40, 140, 18); * * //jLabel1.setFont(new java.awt.Font("Tahoma", 1, 11)); * jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); * jLabel1.setText("Sensitivity <"); add(jLabel1); * jLabel1.setBounds(290, 40, 80, 20); * * //jLabel2.setFont(new java.awt.Font("Tahoma", 1, 11)); * jLabel2.setText("> Specificity"); add(jLabel2); * jLabel2.setBounds(525, 40, 70, 20); */ dataModel.addPanel(jScrollPane1, null, 0); dataModel.addPanel(jScrollPane2, jAndOrLabel1, 0); dataModel.addPanel(jScrollPane3, jAndOrLabel2, 555); }
From source file:edu.harvard.i2b2.query.ui.MainPanel.java
/** * This method is called from within the constructor to initialize the form. *//* w ww . jav a 2s. c om*/ private void initComponents() { jAnalysisLabel = new javax.swing.JLabel(); jTimingLabel = new javax.swing.JLabel(); jNameLabel = new javax.swing.JLabel(); jSetSizeLabel = new javax.swing.JLabel(); jNameTextField = new javax.swing.JTextField(); jSetSizeFiled = new javax.swing.JLabel(); jDeleteButton = new javax.swing.JButton(); jScrollPane1 = new GroupPanel("Group 1", this); jRunQueryButton = new javax.swing.JButton(); jCancelButton = new javax.swing.JButton(); jClearGroupsButton = new javax.swing.JButton(); jScrollPane2 = new GroupPanel("Group 2", this); jScrollPane3 = new GroupPanel("Group 3", this); jScrollPane4 = new javax.swing.JScrollPane(); jPanel1 = new javax.swing.JPanel(); // jVisitComboBox = new javax.swing.JComboBox(); jAndOrLabel1 = new javax.swing.JLabel(); jAndOrLabel2 = new javax.swing.JLabel(); jMorePanelsButton = new javax.swing.JButton(); jWorkflowToolBar = new javax.swing.JToolBar(); // jTimelineToggleButton = new javax.swing.JToggleButton(); jPatientCountToggleButton = new javax.swing.JToggleButton(); // jPatientSetToggleButton = new javax.swing.JToggleButton(); jToolbarPanel = new javax.swing.JPanel(); jQueryNamePanel = new javax.swing.JPanel(); // jOptionsScrollPane = new javax.swing.JScrollPane(); jOptionsPanel = new AnalysisPanel(); jTimingPanel = new TimingPanel(this.dataModel); jShowTimelineCheckBox = new javax.swing.JCheckBox(); jGetAllPatientsCheckBox = new javax.swing.JCheckBox(); // jGetPatientCountCheckBox = new javax.swing.JCheckBox(); // jGetPatientSetCheckBox = new javax.swing.JCheckBox(); setLayout(null); // jScrollPane4.setHorizontalScrollBarPolicy(javax.swing. // ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); jPanel1.setLayout(null); jPanel1.add(jScrollPane1); jScrollPane1.setBounds(0, 0, 180, 200); jPanel1.add(jScrollPane2); jScrollPane2.setBounds(185, 0, 180, 200); jPanel1.add(jScrollPane3); jScrollPane3.setBounds(370, 0, 180, 200); // jAndOrLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER) // ; jAndOrLabel1.setText("and"); // jAndOrLabel1.setBorder(javax.swing.BorderFactory.createEtchedBorder()) // ; // jPanel1.add(jAndOrLabel1); // jAndOrLabel1.setBounds(190, 90, 30, 18); // jAndOrLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER) // ; // jAndOrLabel2.setText("and"); // jAndOrLabel2.setBorder(javax.swing.BorderFactory.createEtchedBorder()) // ; // jPanel1.add(jAndOrLabel2); // jAndOrLabel2.setBounds(410, 90, 30, 18); jQueryNamePanel.setLayout(null); jQueryNamePanel.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jNameLabel.setText(" Query Name: "); jNameLabel.setToolTipText("You may drag this item to workplace to save the query definition"); jNameLabel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jNameLabel.setBounds(2, 2, 70, 23); add(jNameLabel); // jQueryNamePanel.add(jNameLabel); jNameLabel.setTransferHandler(new NameLabelTextHandler()); jNameLabel.addMouseListener(new DragMouseAdapter()); jNameLabel.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { public void mouseMoved(java.awt.event.MouseEvent evt) { jNameLabelMouseMoved(evt); } }); jNameLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseExited(java.awt.event.MouseEvent evt) { jNameLabelMouseExited(evt); } }); jNameTextField.setText(""); jNameTextField.setBounds(95, 10, 370, 20); jNameTextField.setEditable(false); jNameTextField.setDragEnabled(true); jNameTextField.setTransferHandler(new TransferHandler("Text")); // jQueryNamePanel.add(jNameTextField); // add(jNameTextField); // add(jQueryNamePanel); // jQueryNamePanel.setBounds(5, 5, 400, 50); jClearGroupsButton.setFont(new java.awt.Font("Tahoma", 1, 10)); jClearGroupsButton.setText("X"); jClearGroupsButton.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); jClearGroupsButton.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT); jClearGroupsButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); jClearGroupsButton.setToolTipText("Reset all panels"); if (System.getProperty("os.name").toLowerCase().indexOf("mac") > -1) { jClearGroupsButton.setMargin(new java.awt.Insets(-10, -15, -10, -20)); } jClearGroupsButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jClearGroupsButtonActionPerformed(evt); } }); jClearGroupsButton.setBounds(600, 10, 30, 20); add(jClearGroupsButton); jAnalysisLabel.setText("Analysis Types"); // jAnalysisLabel.setBackground(Color.WHITE); // jAnalysisLabel.setOpaque(true); jAnalysisLabel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jAnalysisLabel.setBounds(2, 2, 120, 23); jAnalysisLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jAnalysisLabel.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); add(jAnalysisLabel); jPanel1.setPreferredSize(new Dimension(700, 150)); jScrollPane4.setViewportView(jPanel1); add(jScrollPane4); jScrollPane4.setBounds(20, 35, 635, 220); jScrollPane4.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); jScrollPane4.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); // jScrollPane4.setBorder(javax.swing.BorderFactory // .createLineBorder(new java.awt.Color(0, 0, 0))); jCancelButton.setText("Cancel"); jCancelButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCancelButtonActionPerformed(evt); } }); // add(jCancelButton); // jCancelButton.setBounds(20, 255, 90, 23); // jCancelButton.setFont(new Font("Tahoma", Font.PLAIN, 10)); jGetAllPatientsCheckBox.setText("Get Everyone"); jGetAllPatientsCheckBox.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); // jGetAllPatientsCheckBox // .setBorder(new javax.swing.border.SoftBevelBorder( // javax.swing.border.BevelBorder.RAISED)); jGetAllPatientsCheckBox.setBorderPainted(true); jGetAllPatientsCheckBox.setContentAreaFilled(false); jGetAllPatientsCheckBox.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jGetAllPatientsCheckBox.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); jGetAllPatientsCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); jGetAllPatientsCheckBox.setToolTipText("Get all the patients in datamart"); add(jGetAllPatientsCheckBox); jGetAllPatientsCheckBox.setBounds(5, 255, 110, 15); jGetAllPatientsCheckBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jGetAllPatientsCheckBoxActionPerformed(evt); } }); jRunQueryButton.setText("Run Query Above"); jRunQueryButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jRunQueryButtonActionPerformed(evt); } }); add(jRunQueryButton); jRunQueryButton.setBounds(100, 255, 625, 23); jSetSizeLabel.setText(" Patient(s) returned:"); add(jSetSizeLabel); jSetSizeLabel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jSetSizeLabel.setBounds(20, 275, 70, 23); // jSetSizeFiled.setText(" subjects"); // jSetSizeFiled.setEditable(false); // jSetSizeFiled.setHorizontalAlignment(SwingConstants.LEFT); // add(jSetSizeFiled); // jSetSizeLabel.setBounds(20, 275, 70, 23); jToolbarPanel.setLayout(new java.awt.BorderLayout()); // jWorkflowToolBar.setRollover(true); // jWorkflowToolBar.setInheritsPopupMenu(true); // jTimelineToggleButton // .setIcon(new javax.swing.ImageIcon( // "C:\\Documents and Settings\\wp066\\My Documents\\icons\\wb16.gif")); // /jTimelineToggleButton.setText("Show TimeLine"); // jTimelineToggleButton.setFocusPainted(false); // jWorkflowToolBar.add(jTimelineToggleButton); jPatientCountToggleButton.setIcon( new javax.swing.ImageIcon("C:\\Documents and Settings\\wp066\\My Documents\\icons\\wb16.gif")); jPatientCountToggleButton.setText("Get Patient Count"); jPatientCountToggleButton.setFocusPainted(false); jWorkflowToolBar.add(jPatientCountToggleButton); // jPatientSetToggleButton // .setIcon(new javax.swing.ImageIcon( // "C:\\Documents and Settings\\wp066\\My Documents\\icons\\wb16.gif")); // jPatientSetToggleButton.setText("Get Patient Set"); // jPatientSetToggleButton.setFocusPainted(false); // jWorkflowToolBar.add(jPatientSetToggleButton); jWorkflowToolBar.setPreferredSize(new Dimension(380, 40)); jToolbarPanel.add(jWorkflowToolBar, java.awt.BorderLayout.PAGE_START); jToolbarPanel.add(jWorkflowToolBar, java.awt.BorderLayout.CENTER); // add(jToolbarPanel); jToolbarPanel.setBounds(20, 130, 240, 23); jMorePanelsButton.setText("<html><center>Add<br>" + "<left>Group"); jMorePanelsButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMorePanelsButtonActionPerformed(evt); } }); // add(jMorePanelsButton); // jMorePanelsButton.setBounds(655, 35, 60, 220); jPanel1.add(jMorePanelsButton); jMorePanelsButton.setBounds(550, 0, 60, 200); // jOptionsPanel.setLayout(null); // jOptionsScrollPane.setBorder(javax.swing.BorderFactory // .createEtchedBorder()); // jOptionsPanel.setPreferredSize(new java.awt.Dimension(100, 100)); jShowTimelineCheckBox.setText("Timeline"); jShowTimelineCheckBox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); jShowTimelineCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); jShowTimelineCheckBox.setToolTipText("Get the patient set and display it in timeline view"); // jOptionsPanel.add(jShowTimelineCheckBox); jShowTimelineCheckBox.setBounds(5, 20, 110, 15); // jGetPatientCountCheckBox.setText("Patient Count"); // jGetPatientCountCheckBox.setBorder(javax.swing.BorderFactory // .createEmptyBorder(0, 0, 0, 0)); // jGetPatientCountCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); // jGetPatientCountCheckBox.setToolTipText("Get the patient count XML"); // jOptionsPanel.add(jGetPatientCountCheckBox); // jGetPatientCountCheckBox.setBounds(5, 50, 110, 15); // jGetPatientSetCheckBox.setText("Patient Set"); // jGetPatientSetCheckBox.setBorder(javax.swing.BorderFactory // .createEmptyBorder(0, 0, 0, 0)); // jGetPatientSetCheckBox.setMargin(new java.awt.Insets(0, 0, 0, 0)); // jOptionsPanel.add(jGetPatientSetCheckBox); // jGetPatientSetCheckBox.setBounds(10, 80, 80, 15); // jOptionsScrollPane.setViewportView(jOptionsPanel); add(jOptionsPanel); jOptionsPanel.setBounds(500, 30, 120, 120); jTimingLabel.setText("Query Timing"); // jAnalysisLabel.setBackground(Color.WHITE); // jAnalysisLabel.setOpaque(true); jTimingLabel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jTimingLabel.setBounds(2, 2, 120, 23); jTimingLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jTimingLabel.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); add(jTimingLabel); jTimingLabel.setBounds(500, 30, 120, 120); add(jTimingPanel); jTimingPanel.setBounds(500, 122, 120, 70); /* * jDeleteButton.setText("Delete"); jDeleteButton.addActionListener(new * java.awt.event.ActionListener() { public void * actionPerformed(java.awt.event.ActionEvent evt) { * jDeleteButtonActionPerformed(evt); } }); * * jVisitComboBox.setModel(new javax.swing.DefaultComboBoxModel(new * String[] { "Groups don't have to occur in the same visit", "Groups * must all occur in the same visit" })); add(jVisitComboBox); * jVisitComboBox.setBounds(20, 40, 240, 22); * * //add(jDeleteButton); //jDeleteButton.setBounds(20, 10, 65, 23); * * add(jScrollPane1); jScrollPane1.setBounds(20, 70, 170, 320); * * jRunQueryButton.setText("Run Query"); * jRunQueryButton.addActionListener(new java.awt.event.ActionListener() * { public void actionPerformed(java.awt.event.ActionEvent evt) { * jRunQueryButtonActionPerformed(evt); } }); * * add(jRunQueryButton); jRunQueryButton.setBounds(20, 10, 87, 23); * * jCancelButton.setText("Remove All"); * jCancelButton.addActionListener(new java.awt.event.ActionListener() { * public void actionPerformed(java.awt.event.ActionEvent evt) { * jRemoveAllButtonActionPerformed(evt); } }); * * add(jCancelButton); jCancelButton.setBounds(115, 10, 90, 23); * * //jScrollPane4.setHorizontalScrollBarPolicy(javax.swing. * ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); * jPanel1.setLayout(null); * jScrollPane4.getHorizontalScrollBar().setUnitIncrement(20); * //jPanel1.setVisible(false); * * //jScrollPane1.setToolTipText("scrollpane 1"); * jPanel1.add(jScrollPane1); jScrollPane1.setBounds(0, 0, 170, 350); * * jPanel1.add(jScrollPane2); jScrollPane2.setBounds(210, 0, 170, 350); */ jAndOrLabel1.setBackground(new java.awt.Color(255, 255, 255)); jAndOrLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jAndOrLabel1.setText("and"); jAndOrLabel1.setToolTipText("Click to change the relationship"); jAndOrLabel1.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jAndOrLabel1.addMouseListener(new java.awt.event.MouseAdapter() { @Override public void mouseClicked(java.awt.event.MouseEvent evt) { jAndOrLabel1MouseClicked(evt); } }); // jPanel1.add(jAndOrLabel1); jAndOrLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jAndOrLabel2.setText("and"); jAndOrLabel2.setToolTipText("Click to change the relationship"); jAndOrLabel2.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jAndOrLabel2.addMouseListener(new java.awt.event.MouseAdapter() { @Override public void mouseClicked(java.awt.event.MouseEvent evt) { jAndOrLabel2MouseClicked(evt); } }); // jPanel1.add(jAndOrLabel2); // jTree1.addTreeWillExpandListener(this); // jTree1.addTreeExpansionListener(this); // jScrollPane1.setViewportView(new QueryConceptTreePanel("Group 1")); // jScrollPane1.setToolTipText("Double click on a folder to view the // items inside"); // jTree2.addTreeExpansionListener(this); // jScrollPane2.setViewportView(new QueryConceptTreePanel("Group 2")); // jTree3.addTreeExpansionListener(this); // treepanel = new QueryConceptTreePanel("", this); // jScrollPane3.setViewportView(new QueryConceptTreePanel("Group 3")); // jSlider1.setMajorTickSpacing(20); /* * jSlider1.setPaintTicks(true); jSlider1.setValue(0); * jSlider1.setMinorTickSpacing(10); jSlider1.setToolTipText("Slider on * left is more Sensitive Query, " + "on right is more Specific"); * add(jSlider1); jSlider1.setBounds(380, 40, 140, 18); * * //jLabel1.setFont(new java.awt.Font("Tahoma", 1, 11)); * jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); * jLabel1.setText("Sensitivity <"); add(jLabel1); * jLabel1.setBounds(290, 40, 80, 20); * * //jLabel2.setFont(new java.awt.Font("Tahoma", 1, 11)); * jLabel2.setText("> Specificity"); add(jLabel2); * jLabel2.setBounds(525, 40, 70, 20); */ dataModel.addPanel(jScrollPane1, null, 0); dataModel.addPanel(jScrollPane2, jAndOrLabel1, 0); dataModel.addPanel(jScrollPane3, jAndOrLabel2, 555); }
From source file:es.emergya.ui.gis.popups.ConsultaHistoricos.java
private JPanel getElementos() { JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEADING)); panel.setOpaque(false);// www. jav a 2 s.co m panel.setBorder(new TitledBorder("Elementos a Consultar")); JLabel jLabel = new JLabel("Recursos", SwingConstants.RIGHT); jLabel.setPreferredSize(ConsultaHistoricos.DIMENSION_LABEL); panel.add(jLabel); recursos = new JList(new DefaultListModel()); recursos.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.CTRL_MASK), "selectAll"); recursos.getActionMap().put("selectAll", new AbstractAction() { private static final long serialVersionUID = -5515338515763292526L; @Override public void actionPerformed(ActionEvent e) { recursos.setSelectionInterval(0, recursos.getModel().getSize() - 1); } }); recursos.addListSelectionListener(listSelectionListener); final JScrollPane jScrollPaneR = new JScrollPane(recursos, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); jScrollPaneR.getViewport().setPreferredSize(DIMENSION_JLIST); panel.add(jScrollPaneR); jLabel = new JLabel("Incidencias", SwingConstants.RIGHT); jLabel.setPreferredSize(ConsultaHistoricos.DIMENSION_LABEL); panel.add(jLabel); incidencias = new JList(new DefaultListModel()); incidencias.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_E, InputEvent.CTRL_MASK), "selectAll"); incidencias.getActionMap().put("selectAll", new AbstractAction() { private static final long serialVersionUID = -5515338515763292526L; @Override public void actionPerformed(ActionEvent e) { incidencias.setSelectionInterval(0, incidencias.getModel().getSize() - 1); } }); incidencias.addListSelectionListener(listSelectionListener); final JScrollPane jScrollPaneI = new JScrollPane(incidencias, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); jScrollPaneI.getViewport().setPreferredSize(DIMENSION_JLIST); panel.setPreferredSize(DIMENSION_2JLIST); panel.add(jScrollPaneI); return panel; }
From source file:edu.harvard.mcz.imagecapture.GeoreferenceDialog.java
private void init() { setBounds(100, 100, 450, 560);/* w w w .j a va 2s . c o m*/ getContentPane().setLayout(new BorderLayout()); contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5)); getContentPane().add(contentPanel, BorderLayout.CENTER); contentPanel.setLayout(new GridLayout(0, 2, 0, 0)); { JLabel lblLatitude = new JLabel("Latitude"); lblLatitude.setHorizontalAlignment(SwingConstants.RIGHT); contentPanel.add(lblLatitude); } textFieldDecimalLat = new JTextField(); contentPanel.add(textFieldDecimalLat); textFieldDecimalLat.setColumns(10); JLabel lblLongitude = new JLabel("Longitude"); lblLongitude.setHorizontalAlignment(SwingConstants.RIGHT); contentPanel.add(lblLongitude); { textFieldDecimalLong = new JTextField(); contentPanel.add(textFieldDecimalLong); textFieldDecimalLong.setColumns(10); } { JLabel lblDatum = new JLabel("Datum"); lblDatum.setHorizontalAlignment(SwingConstants.RIGHT); contentPanel.add(lblDatum); } @SuppressWarnings("unchecked") ComboBoxModel<String> datumModel = new ListComboBoxModel<String>(LatLong.getDatumValues()); cbDatum = new JComboBox<String>(datumModel); contentPanel.add(cbDatum); JLabel lblMethod = new JLabel("Method"); lblMethod.setHorizontalAlignment(SwingConstants.RIGHT); contentPanel.add(lblMethod); @SuppressWarnings("unchecked") ComboBoxModel<String> methodModel = new ListComboBoxModel<String>(LatLong.getGeorefMethodValues()); cbMethod = new JComboBox<String>(new DefaultComboBoxModel<String>(new String[] { "not recorded", "unknown", "GEOLocate", "Google Earth", "Gazeteer", "GPS", "MaNIS/HertNet/ORNIS Georeferencing Guidelines" })); cbMethod.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { setState(); } }); contentPanel.add(cbMethod); JLabel lblAccuracy = new JLabel("GPS Accuracy"); lblAccuracy.setHorizontalAlignment(SwingConstants.RIGHT); contentPanel.add(lblAccuracy); txtGPSAccuracy = new JTextField(); txtGPSAccuracy.setColumns(10); contentPanel.add(txtGPSAccuracy); JLabel lblNewLabel_1 = new JLabel("Original Units"); lblNewLabel_1.setHorizontalAlignment(SwingConstants.RIGHT); contentPanel.add(lblNewLabel_1); comboBoxOrigUnits = new JComboBox<String>(); comboBoxOrigUnits.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { setState(); } }); comboBoxOrigUnits.setModel(new DefaultComboBoxModel<String>( new String[] { "decimal degrees", "deg. min. sec.", "degrees dec. minutes", "unknown" })); contentPanel.add(comboBoxOrigUnits); lblErrorRadius = new JLabel("Error Radius"); lblErrorRadius.setHorizontalAlignment(SwingConstants.RIGHT); contentPanel.add(lblErrorRadius); txtErrorRadius = new JTextField(); txtErrorRadius.setColumns(10); contentPanel.add(txtErrorRadius); JLabel lblErrorRadiusUnits = new JLabel("Error Radius Units"); lblErrorRadiusUnits.setHorizontalAlignment(SwingConstants.RIGHT); contentPanel.add(lblErrorRadiusUnits); comboBoxErrorUnits = new JComboBox<String>(); comboBoxErrorUnits.setModel(new DefaultComboBoxModel<String>(new String[] { "m", "ft", "km", "mi", "yd" })); contentPanel.add(comboBoxErrorUnits); JLabel lblLatDegrees = new JLabel("Lat Degrees"); lblLatDegrees.setHorizontalAlignment(SwingConstants.RIGHT); contentPanel.add(lblLatDegrees); txtLatDegrees = new JTextField(); txtLatDegrees.setColumns(4); contentPanel.add(txtLatDegrees); JLabel lblLatDecMin = new JLabel("Lat Dec Min"); lblLatDecMin.setHorizontalAlignment(SwingConstants.RIGHT); contentPanel.add(lblLatDecMin); txtLatDecMin = new JTextField(); txtLatDecMin.setColumns(6); contentPanel.add(txtLatDecMin); JLabel lblLatMin = new JLabel("Lat Min"); lblLatMin.setHorizontalAlignment(SwingConstants.RIGHT); contentPanel.add(lblLatMin); txtLatMin = new JTextField(); txtLatMin.setColumns(6); contentPanel.add(txtLatMin); JLabel lblLatSec = new JLabel("Lat Sec"); lblLatSec.setHorizontalAlignment(SwingConstants.RIGHT); contentPanel.add(lblLatSec); txtLatSec = new JTextField(); txtLatSec.setColumns(6); contentPanel.add(txtLatSec); JLabel lblLatDir = new JLabel("Lat N/S"); lblLatDir.setHorizontalAlignment(SwingConstants.RIGHT); contentPanel.add(lblLatDir); cbLatDir = new JComboBox<String>(); cbLatDir.setModel(new DefaultComboBoxModel<String>(new String[] { "N", "S" })); contentPanel.add(cbLatDir); JLabel lblLongDegrees = new JLabel("Long Degrees"); lblLongDegrees.setHorizontalAlignment(SwingConstants.RIGHT); contentPanel.add(lblLongDegrees); txtLongDegrees = new JTextField(); txtLongDegrees.setColumns(4); contentPanel.add(txtLongDegrees); JLabel lblLongDecMin = new JLabel("Long Dec Min"); lblLongDecMin.setHorizontalAlignment(SwingConstants.RIGHT); contentPanel.add(lblLongDecMin); txtLongDecMin = new JTextField(); txtLongDecMin.setColumns(6); contentPanel.add(txtLongDecMin); JLabel lblLongMin = new JLabel("Long Min"); lblLongMin.setHorizontalAlignment(SwingConstants.RIGHT); contentPanel.add(lblLongMin); txtLongMin = new JTextField(); txtLongMin.setColumns(6); contentPanel.add(txtLongMin); JLabel lblLongSec = new JLabel("Long Sec"); lblLongSec.setHorizontalAlignment(SwingConstants.RIGHT); contentPanel.add(lblLongSec); txtLongSec = new JTextField(); txtLongSec.setColumns(6); contentPanel.add(txtLongSec); JLabel lblLongDir = new JLabel("Long E/W"); lblLongDir.setHorizontalAlignment(SwingConstants.RIGHT); contentPanel.add(lblLongDir); cbLongDir = new JComboBox<String>(); cbLongDir.setModel(new DefaultComboBoxModel<String>(new String[] { "E", "W" })); contentPanel.add(cbLongDir); JLabel lblDetBy = new JLabel("Determined By"); lblDetBy.setHorizontalAlignment(SwingConstants.RIGHT); contentPanel.add(lblDetBy); textFieldDetBy = new JTextField(); contentPanel.add(textFieldDetBy); textFieldDetBy.setColumns(10); JLabel lblDetDate = new JLabel("Date Determined"); lblDetDate.setHorizontalAlignment(SwingConstants.RIGHT); contentPanel.add(lblDetDate); try { textDetDate = new JFormattedTextField(new MaskFormatter("####-##-##")); } catch (ParseException e1) { textDetDate = new JFormattedTextField(); } textDetDate.setToolTipText("Date on which georeference was made yyyy-mm-dd"); contentPanel.add(textDetDate); JLabel lblRef = new JLabel("Reference Source"); lblRef.setHorizontalAlignment(SwingConstants.RIGHT); contentPanel.add(lblRef); textRefSource = new JTextField(); contentPanel.add(textRefSource); textRefSource.setColumns(10); lblNewLabel = new JLabel("Remarks"); lblNewLabel.setHorizontalAlignment(SwingConstants.RIGHT); contentPanel.add(lblNewLabel); textFieldRemarks = new JTextField(); contentPanel.add(textFieldRemarks); textFieldRemarks.setColumns(10); { JPanel buttonPane = new JPanel(); buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT)); getContentPane().add(buttonPane, BorderLayout.SOUTH); { lblErrorLabel = new JLabel("Message"); buttonPane.add(lblErrorLabel); } { okButton = new JButton("OK"); okButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { lblErrorLabel.setText(""); if (saveData()) { setVisible(false); } } }); okButton.setActionCommand("OK"); buttonPane.add(okButton); getRootPane().setDefaultButton(okButton); } { JButton cancelButton = new JButton("Cancel"); cancelButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { loadData(); setVisible(false); } }); cancelButton.setActionCommand("Cancel"); buttonPane.add(cancelButton); } } }
From source file:edu.ku.brc.ui.tmanfe.SearchReplacePanel.java
/** * Setst the status label to alert the user that a word has not been found. *//*from ww w . j a v a 2s . com*/ public void setStatusLabelWithFailedFind() { log.info("NOT FOUND - Findvalue[" + findField.getText() + "] displaying statusInfo to the user"); statusInfo.setHorizontalTextPosition(SwingConstants.RIGHT); statusInfo.setIcon(IconManager.getIcon("Error", IconManager.IconSize.Std16)); statusInfo.setText(getResourceString("SS_SR_PHRASENOTFOUND")); }