List of usage examples for com.jgoodies.forms.layout CellConstraints xywh
public CellConstraints xywh(int col, int row, int colSpan, int rowSpan, Alignment colAlign, Alignment rowAlign)
Examples:
cc.xywh(1, 3, 2, 1, CellConstraints.LEFT, CellConstraints.BOTTOM); cc.xywh(1, 3, 7, 3, CellConstraints.CENTER, CellConstraints.FILL);
From source file:cz.vity.freerapid.gui.dialogs.SubmitErrorDialog.java
@SuppressWarnings({ "deprecation" }) private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Open Source Project license - unknown JPanel dialogPane = new JPanel(); JPanel contentPanel = new JPanel(); JLabel labelName = new JLabel(); fieldName = ComponentFactory.getTextField(); JLabel labelEmail = new JLabel(); fieldEmail = ComponentFactory.getTextField(); JLabel labelComment = new JLabel(); JScrollPane scrollPane1 = new JScrollPane(); commentTextArea = ComponentFactory.getTextArea(); JLabel labelDescribeInfo = new JLabel(); JPanel buttonBar = new JPanel(); btnConnection = new JButton(); btnOk = new JButton(); btnCancel = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); //======== dialogPane ======== {//from w w w . j a v a 2s . c om dialogPane.setBorder(Borders.DIALOG); dialogPane.setName("dialogPane"); dialogPane.setLayout(new BorderLayout()); //======== contentPanel ======== { contentPanel.setName("contentPanel"); //---- labelName ---- labelName.setLabelFor(fieldName); labelName.setName("labelName"); //---- fieldName ---- fieldName.setColumns(15); fieldName.setName("fieldName"); //---- labelEmail ---- labelEmail.setLabelFor(fieldEmail); labelEmail.setName("labelEmail"); //---- fieldEmail ---- fieldEmail.setColumns(15); fieldEmail.setName("fieldEmail"); //---- labelComment ---- labelComment.setLabelFor(commentTextArea); labelComment.setName("labelComment"); //======== scrollPane1 ======== { scrollPane1.setName("scrollPane1"); //---- commentTextArea ---- commentTextArea.setRows(10); commentTextArea.setLineWrap(true); commentTextArea.setName("commentTextArea"); scrollPane1.setViewportView(commentTextArea); } //---- labelDescribeInfo ---- labelDescribeInfo.setName("labelDescribeInfo"); PanelBuilder contentPanelBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC }, new RowSpec[] { FormSpecs.DEFAULT_ROWSPEC, FormSpecs.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormSpecs.LINE_GAP_ROWSPEC, FormSpecs.DEFAULT_ROWSPEC }), contentPanel); contentPanelBuilder.add(labelName, cc.xy(1, 1)); contentPanelBuilder.add(fieldName, cc.xy(3, 1)); contentPanelBuilder.add(labelEmail, cc.xy(5, 1)); contentPanelBuilder.add(fieldEmail, cc.xy(7, 1)); contentPanelBuilder.add(labelComment, cc.xywh(1, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP)); contentPanelBuilder.add(scrollPane1, cc.xywh(3, 3, 5, 1)); contentPanelBuilder.add(labelDescribeInfo, cc.xywh(3, 5, 5, 1)); } dialogPane.add(contentPanel, BorderLayout.CENTER); //======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_PAD); buttonBar.setName("buttonBar"); //---- button1 ---- btnConnection.setName("btnConnection"); //---- okButton ---- btnOk.setName("okButton"); //---- cancelButton ---- btnCancel.setName("cancelButton"); PanelBuilder buttonBarBuilder = new PanelBuilder(new FormLayout( new ColumnSpec[] { FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.DEFAULT_COLSPEC, FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, ColumnSpec.decode("max(min;10dlu):grow"), FormSpecs.LABEL_COMPONENT_GAP_COLSPEC, FormSpecs.BUTTON_COLSPEC, FormSpecs.RELATED_GAP_COLSPEC, ComponentFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref")), buttonBar); buttonBarBuilder.add(btnConnection, cc.xywh(2, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); buttonBarBuilder.add(btnOk, cc.xy(6, 1)); buttonBarBuilder.add(btnCancel, cc.xy(8, 1)); } dialogPane.add(buttonBar, BorderLayout.SOUTH); } contentPane.add(dialogPane, BorderLayout.CENTER); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:de.dfki.km.text20.diagnosis.gui.panel.templates.ServerPanelTemplate.java
@SuppressWarnings("unqualified-field-access") private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license this.visualEyeTrackingDataPanel = new JPanel(); this.eyePositionDisplay = new EyePositionDisplay(); this.eyeDistanceDisplay = new EyeDistanceDisplay(); this.pupilSizeDisplay = new PupilSizeDisplay(); this.tabbedPane = new JTabbedPane(); this.overallPanel = new JPanel(); this.eyeTrackingDeviceNameLabel = new JLabel(); this.eyeTrackingDeviceNameValueLabel = new JLabel(); this.eyeTrackingDeviceTypeLabel = new JLabel(); this.eyeTrackingDeviceTypeValueLabel = new JLabel(); this.eyeTrackingDeviceLocationLabel = new JLabel(); this.eyeTrackingDeviceLocationValueLabel = new JLabel(); this.recordingTitle = new JLabel(); this.recordIndicator = new JStatusIndicator(); this.recordSwitch = new JXHyperlink(); this.eyeTrackingEventRateLabel = new JLabel(); this.eventRateIndicator = new JStatusIndicator(); this.eventRate = new JLabel(); this.brainTrackingDeviceNameLabel = new JLabel(); this.brainTrackingDeviceNameValueLabel = new JLabel(); this.brainTrackingDeviceLocationLabel = new JLabel(); this.brainTrackingDeviceLocationValueLabel = new JLabel(); this.brainTrackerRecordingStatusLabel = new JLabel(); this.brainRecordIndicator = new JStatusIndicator(); this.brainTrackingRecordSwitch = new JXHyperlink(); this.brainTrackingEventRateLabel = new JLabel(); this.brainTrackingEventRateIndicator = new JStatusIndicator(); this.brainTrackingEventRateValue = new JLabel(); this.deviceTrackingSinceLabel = new JLabel(); this.trackingSince = new JLabel(); this.brainHistoryLabel = new JLabel(); this.brainHistoryLink = new JXHyperlink(); this.gazePositionLabel = new JLabel(); this.gazePositionHistoryLink = new JXHyperlink(); this.headPositionLabel = new JLabel(); this.headPositionIndicator = new JStatusIndicator(); this.headPositionHistoryLink = new JXHyperlink(); this.headDistanceLabel = new JLabel(); this.headDistanceIndicator = new JStatusIndicator(); this.headDistanceHistoryLink = new JXHyperlink(); this.pupilSizeLabel = new JLabel(); this.pupilSizeHistoryLink = new JXHyperlink(); this.hardwareRecalibrationLabel = new JLabel(); this.performHardwareRecalibrationLink = new JXHyperlink(); this.localRecalibrationVerificationLabel = new JLabel(); this.calibrationIndicator = new JStatusIndicator(); this.performRecalibrationLink = new JXHyperlink(); this.qualityLabel = new JLabel(); this.overallQualityIndicator = new JStatusIndicator(); this.overallQualityLabel = new JLabel(); this.panel3 = new JPanel(); this.scrollPane4 = new JScrollPane(); this.logText = new JTextPane(); this.settingsPanel = new JPanel(); this.bufferSizeEyeTrackerHistoryLabel = new JLabel(); this.bufferSizeLabel = new JLabel(); this.bufferSizeSlider = new JSlider(); this.bufferSizeBrainTrackerHistoryLabel = new JLabel(); this.bufferSizeBrainTrackerHistoryValueLabel = new JLabel(); this.bufferSizeBrainTrackerHistorySlider = new JSlider(); this.transparentLocalRecalibrationLabel2 = new JLabel(); this.ministatus = new JCheckBox(); this.transparentLocalRecalibrationLabel = new JLabel(); this.transparentRecalibration = new JCheckBox(); this.ChannelPanel = new JPanel(); CellConstraints cc = new CellConstraints(); //======== this ======== setLayout(new FormLayout("default:grow", "min, $lgap, 0dlu, $lgap, fill:[200dlu,pref]:grow")); //======== visualEyeTrackingDataPanel ======== {//from w w w. j av a 2 s . c om this.visualEyeTrackingDataPanel.setBorder(new TitledBorder(null, "Visual Tracking Data", TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION)); this.visualEyeTrackingDataPanel.setPreferredSize(new Dimension(506, 500)); this.visualEyeTrackingDataPanel.setOpaque(false); this.visualEyeTrackingDataPanel.setRequestFocusEnabled(false); this.visualEyeTrackingDataPanel.setVerifyInputWhenFocusTarget(false); this.visualEyeTrackingDataPanel.setAlignmentY(1.5F); this.visualEyeTrackingDataPanel .setLayout(new FormLayout("default:grow, 2*($lcgap, default)", "fill:150dlu")); ((FormLayout) this.visualEyeTrackingDataPanel.getLayout()).setColumnGroups(new int[][] { { 3, 5 } }); //---- eyePositionDisplay ---- this.eyePositionDisplay.setPreferredSize(new Dimension(300, 200)); this.eyePositionDisplay.setBorder(new EmptyBorder(5, 5, 5, 5)); this.eyePositionDisplay.setMinimumSize(new Dimension(1, 200)); this.eyePositionDisplay.setEyePostionCanvasBackgroundColor(Color.darkGray); this.visualEyeTrackingDataPanel.add(this.eyePositionDisplay, cc.xy(1, 1)); //---- eyeDistanceDisplay ---- this.eyeDistanceDisplay.setPreferredSize(new Dimension(50, 300)); this.eyeDistanceDisplay.setMinimumSize(new Dimension(1, 300)); this.eyeDistanceDisplay.setPaddingVal(4); this.eyeDistanceDisplay.setBackground(null); this.eyeDistanceDisplay.setForeground(Color.darkGray); this.eyeDistanceDisplay.setEyeDistanceCanvasColor(Color.darkGray); this.visualEyeTrackingDataPanel.add(this.eyeDistanceDisplay, new CellConstraints(3, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(5, 0, 5, 0))); //---- pupilSizeDisplay ---- this.pupilSizeDisplay.setPreferredSize(new Dimension(60, 300)); this.pupilSizeDisplay.setMinimumSize(new Dimension(1, 300)); this.pupilSizeDisplay.setPupilSizeCanvasBackgroundColor(Color.darkGray); this.visualEyeTrackingDataPanel.add(this.pupilSizeDisplay, new CellConstraints(5, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(5, 0, 5, 0))); } add(this.visualEyeTrackingDataPanel, cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //======== tabbedPane ======== { //======== overallPanel ======== { this.overallPanel.setLayout(new FormLayout("150dlu, $lcgap, default, 6dlu, default:grow", "default, $lgap, fill:default, 22*($lgap, default)")); ((FormLayout) this.overallPanel.getLayout()).setRowGroups(new int[][] { { 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 45, 47 } }); //---- eyeTrackingDeviceNameLabel ---- this.eyeTrackingDeviceNameLabel.setText("Eye Tracking Device Name"); this.overallPanel.add(this.eyeTrackingDeviceNameLabel, cc.xy(1, 1)); //---- eyeTrackingDeviceNameValueLabel ---- this.eyeTrackingDeviceNameValueLabel.setText("-"); this.overallPanel.add(this.eyeTrackingDeviceNameValueLabel, cc.xy(5, 1)); //---- eyeTrackingDeviceTypeLabel ---- this.eyeTrackingDeviceTypeLabel.setText("Eye Tracking Device Type"); this.overallPanel.add(this.eyeTrackingDeviceTypeLabel, cc.xy(1, 3)); //---- eyeTrackingDeviceTypeValueLabel ---- this.eyeTrackingDeviceTypeValueLabel.setText("-"); this.overallPanel.add(this.eyeTrackingDeviceTypeValueLabel, cc.xy(5, 3)); //---- eyeTrackingDeviceLocationLabel ---- this.eyeTrackingDeviceLocationLabel.setText("Eye Tracking Device Location"); this.overallPanel.add(this.eyeTrackingDeviceLocationLabel, cc.xy(1, 5)); //---- eyeTrackingDeviceLocationValueLabel ---- this.eyeTrackingDeviceLocationValueLabel.setText("-"); this.overallPanel.add(this.eyeTrackingDeviceLocationValueLabel, cc.xy(5, 5)); //---- recordingTitle ---- this.recordingTitle.setText("Eye Tracker Recording Status"); this.overallPanel.add(this.recordingTitle, cc.xy(1, 7)); this.overallPanel.add(this.recordIndicator, cc.xy(3, 7)); //---- recordSwitch ---- this.recordSwitch.setText("Off"); this.recordSwitch.setActionCommand("toggleRecording"); this.overallPanel.add(this.recordSwitch, cc.xy(5, 7)); //---- eyeTrackingEventRateLabel ---- this.eyeTrackingEventRateLabel.setText("Eye Tracker Event Rate [events per second]"); this.overallPanel.add(this.eyeTrackingEventRateLabel, cc.xy(1, 9)); this.overallPanel.add(this.eventRateIndicator, cc.xy(3, 9)); //---- eventRate ---- this.eventRate.setText("0"); this.overallPanel.add(this.eventRate, cc.xy(5, 9)); //---- brainTrackingDeviceNameLabel ---- this.brainTrackingDeviceNameLabel.setText("Brain Tracking Device Name"); this.overallPanel.add(this.brainTrackingDeviceNameLabel, cc.xy(1, 13)); //---- brainTrackingDeviceNameValueLabel ---- this.brainTrackingDeviceNameValueLabel.setText("-"); this.overallPanel.add(this.brainTrackingDeviceNameValueLabel, cc.xy(5, 13)); //---- brainTrackingDeviceLocationLabel ---- this.brainTrackingDeviceLocationLabel.setText("Brain Tracking Device Location"); this.overallPanel.add(this.brainTrackingDeviceLocationLabel, cc.xy(1, 15)); //---- brainTrackingDeviceLocationValueLabel ---- this.brainTrackingDeviceLocationValueLabel.setText("-"); this.overallPanel.add(this.brainTrackingDeviceLocationValueLabel, cc.xy(5, 15)); //---- brainTrackerRecordingStatusLabel ---- this.brainTrackerRecordingStatusLabel.setText("Brain Tracking Recording Status"); this.overallPanel.add(this.brainTrackerRecordingStatusLabel, cc.xy(1, 17)); this.overallPanel.add(this.brainRecordIndicator, cc.xy(3, 17)); //---- brainTrackingRecordSwitch ---- this.brainTrackingRecordSwitch.setText("Off"); this.brainTrackingRecordSwitch.setActionCommand("toggleBrainRecording"); this.overallPanel.add(this.brainTrackingRecordSwitch, cc.xy(5, 17)); //---- brainTrackingEventRateLabel ---- this.brainTrackingEventRateLabel.setText("Brain Tracker Event Rate [events per second]"); this.overallPanel.add(this.brainTrackingEventRateLabel, cc.xy(1, 19)); this.overallPanel.add(this.brainTrackingEventRateIndicator, cc.xy(3, 19)); //---- brainTrackingEventRateValue ---- this.brainTrackingEventRateValue.setText("0"); this.overallPanel.add(this.brainTrackingEventRateValue, cc.xy(5, 19)); //---- deviceTrackingSinceLabel ---- this.deviceTrackingSinceLabel.setText("Device Tracking Since"); this.overallPanel.add(this.deviceTrackingSinceLabel, cc.xy(1, 23)); //---- trackingSince ---- this.trackingSince.setText("Not tracking"); this.overallPanel.add(this.trackingSince, cc.xy(5, 23)); //---- brainHistoryLabel ---- this.brainHistoryLabel.setText("Brain History"); this.overallPanel.add(this.brainHistoryLabel, cc.xy(1, 27)); //---- brainHistoryLink ---- this.brainHistoryLink.setText("Show brain history ..."); this.brainHistoryLink.setActionCommand("openBrainHistory"); this.overallPanel.add(this.brainHistoryLink, cc.xy(5, 27)); //---- gazePositionLabel ---- this.gazePositionLabel.setText("Gaze Position [normalized]"); this.overallPanel.add(this.gazePositionLabel, cc.xy(1, 31)); //---- gazePositionHistoryLink ---- this.gazePositionHistoryLink.setText("Gaze position history ..."); this.gazePositionHistoryLink.setActionCommand("openGazePositionHistory"); this.overallPanel.add(this.gazePositionHistoryLink, cc.xy(5, 31)); //---- headPositionLabel ---- this.headPositionLabel.setText("Head Position [normalized]"); this.overallPanel.add(this.headPositionLabel, cc.xy(1, 33)); this.overallPanel.add(this.headPositionIndicator, cc.xy(3, 33)); //---- headPositionHistoryLink ---- this.headPositionHistoryLink.setText("Head position history ..."); this.headPositionHistoryLink.setActionCommand("openHeadPositionHistory"); this.overallPanel.add(this.headPositionHistoryLink, cc.xy(5, 33)); //---- headDistanceLabel ---- this.headDistanceLabel.setText("Head Distance [mm]"); this.overallPanel.add(this.headDistanceLabel, cc.xy(1, 35)); this.overallPanel.add(this.headDistanceIndicator, cc.xy(3, 35)); //---- headDistanceHistoryLink ---- this.headDistanceHistoryLink.setText("Head distance history ..."); this.headDistanceHistoryLink.setActionCommand("openHeadDistanceHistory"); this.overallPanel.add(this.headDistanceHistoryLink, cc.xy(5, 35)); //---- pupilSizeLabel ---- this.pupilSizeLabel.setText("Pupil Size [mm]"); this.overallPanel.add(this.pupilSizeLabel, cc.xy(1, 37)); //---- pupilSizeHistoryLink ---- this.pupilSizeHistoryLink.setText("Pupilsize history ..."); this.pupilSizeHistoryLink.setActionCommand("openPupilSizeHistory"); this.overallPanel.add(this.pupilSizeHistoryLink, cc.xy(5, 37)); //---- hardwareRecalibrationLabel ---- this.hardwareRecalibrationLabel.setText("Hardware Calibration"); this.overallPanel.add(this.hardwareRecalibrationLabel, cc.xy(1, 41)); //---- performHardwareRecalibrationLink ---- this.performHardwareRecalibrationLink.setText("Perfom hardware recalibration ..."); this.performHardwareRecalibrationLink.setActionCommand("performHardwareRecalibration"); this.overallPanel.add(this.performHardwareRecalibrationLink, cc.xy(5, 41)); //---- localRecalibrationVerificationLabel ---- this.localRecalibrationVerificationLabel.setText("Local Recalibration & Verficiation"); this.overallPanel.add(this.localRecalibrationVerificationLabel, cc.xy(1, 43)); this.overallPanel.add(this.calibrationIndicator, cc.xy(3, 43)); //---- performRecalibrationLink ---- this.performRecalibrationLink.setText("Perfom local recalibration ..."); this.performRecalibrationLink.setActionCommand("performRecalibration"); this.overallPanel.add(this.performRecalibrationLink, cc.xy(5, 43)); //---- qualityLabel ---- this.qualityLabel.setText("Overall Tracking Quality"); this.overallPanel.add(this.qualityLabel, cc.xy(1, 47)); this.overallPanel.add(this.overallQualityIndicator, cc.xy(3, 47)); //---- overallQualityLabel ---- this.overallQualityLabel.setText("Unknown"); this.overallPanel.add(this.overallQualityLabel, cc.xy(5, 47)); } this.tabbedPane.addTab("Overview", this.overallPanel); //======== panel3 ======== { this.panel3.setLayout(new FormLayout("default:grow", "fill:default:grow")); //======== scrollPane4 ======== { this.scrollPane4.setViewportView(this.logText); } this.panel3.add(this.scrollPane4, cc.xy(1, 1)); } this.tabbedPane.addTab("Message Log", this.panel3); //======== settingsPanel ======== { this.settingsPanel.setLayout( new FormLayout("150dlu, $lcgap, 50dlu, 6dlu, default:grow", "6*(default, $lgap), default")); ((FormLayout) this.settingsPanel.getLayout()).setRowGroups(new int[][] { { 1, 3, 5, 7, 9, 11 } }); //---- bufferSizeEyeTrackerHistoryLabel ---- this.bufferSizeEyeTrackerHistoryLabel.setText("Eye Tracker Buffer Time"); this.settingsPanel.add(this.bufferSizeEyeTrackerHistoryLabel, cc.xy(1, 1)); //---- bufferSizeLabel ---- this.bufferSizeLabel.setText("30s"); this.settingsPanel.add(this.bufferSizeLabel, cc.xywh(3, 1, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- bufferSizeSlider ---- this.bufferSizeSlider.setMinimum(5); this.bufferSizeSlider.setMaximum(120); this.bufferSizeSlider.setMajorTickSpacing(5); this.bufferSizeSlider.setSnapToTicks(true); this.bufferSizeSlider.setValue(30); this.settingsPanel.add(this.bufferSizeSlider, cc.xy(5, 1)); //---- bufferSizeBrainTrackerHistoryLabel ---- this.bufferSizeBrainTrackerHistoryLabel.setText("Brain Tracker Buffer Time"); this.settingsPanel.add(this.bufferSizeBrainTrackerHistoryLabel, cc.xy(1, 3)); //---- bufferSizeBrainTrackerHistoryValueLabel ---- this.bufferSizeBrainTrackerHistoryValueLabel.setText("5s"); this.settingsPanel.add(this.bufferSizeBrainTrackerHistoryValueLabel, cc.xywh(3, 3, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- bufferSizeBrainTrackerHistorySlider ---- this.bufferSizeBrainTrackerHistorySlider.setMaximum(30); this.bufferSizeBrainTrackerHistorySlider.setMinimum(5); this.bufferSizeBrainTrackerHistorySlider.setSnapToTicks(true); this.bufferSizeBrainTrackerHistorySlider.setMajorTickSpacing(1); this.bufferSizeBrainTrackerHistorySlider.setValue(5); this.settingsPanel.add(this.bufferSizeBrainTrackerHistorySlider, cc.xy(5, 3)); //---- transparentLocalRecalibrationLabel2 ---- this.transparentLocalRecalibrationLabel2.setText("Display Ministatus"); this.settingsPanel.add(this.transparentLocalRecalibrationLabel2, cc.xy(1, 7)); //---- ministatus ---- this.ministatus.setText("Ministatus"); this.settingsPanel.add(this.ministatus, cc.xy(5, 7)); //---- transparentLocalRecalibrationLabel ---- this.transparentLocalRecalibrationLabel.setText("Transparent Local Recalibration"); this.settingsPanel.add(this.transparentLocalRecalibrationLabel, cc.xy(1, 11)); //---- transparentRecalibration ---- this.transparentRecalibration.setText("Transparent"); this.settingsPanel.add(this.transparentRecalibration, cc.xy(5, 11)); } this.tabbedPane.addTab("Settings", this.settingsPanel); //======== ChannelPanel ======== { this.ChannelPanel.setLayout(new FormLayout("default:grow", "default")); } this.tabbedPane.addTab("Channels", this.ChannelPanel); } add(this.tabbedPane, cc.xy(1, 5)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:de.luschny.apps.factorial.BenchmarkForm.java
License:Open Source License
@SuppressWarnings("unchecked") private void initComponents() { checkBoxArray = new JCheckBox[21]; JMenuBar menuBar = new JMenuBar(); JMenu benchMenu = new JMenu(); recommededMenu = new JMenuItem(); JMenuItem parallelMenu = new JMenuItem(); primeMenu = new JMenuItem(); simpleMenu = new JMenuItem(); JMenuItem lameMenu = new JMenuItem(); JMenu ectMenu = new JMenu(); sanityMenu = new JMenuItem(); JMenuItem aboutMenu = new JMenuItem(); JLabel algoLabel = new JLabel(); logToFileCheckBox = new JCheckBox(); showValueCheckBox = new JCheckBox(); verboseCheckBox = new JCheckBox(); JLabel startLabel = new JLabel(); startField = new JTextField(); JLabel stepLabel = new JLabel(); stepBox = new JComboBox(); cancelButton = new JButton(); JLabel lenghtLabel = new JLabel(); lenghtSpinner = new JSpinner(); benchmarkButton = new JButton(); JPanel algoSelection = new JPanel(); JScrollPane scrollPane = new JScrollPane(); textArea = new JTextArea(); infoLabel = new JLabel(); progressBar = new JProgressBar(); CellConstraints cc = new CellConstraints(); // ======== benchForm ======== setTitle("Factorial Algorithm Benchmark"); setFont(new Font("Verdana", Font.BOLD, 16)); Container benchFormContentPane = getContentPane(); benchFormContentPane.setLayout(new FormLayout( "6dlu, $lcgap, 4dlu, $lcgap, 82dlu, 10dlu, 6dlu, center:46dlu, $lcgap, 42dlu, $lcgap, 18dlu, $lcgap, center:58dlu, 6dlu, left:12dlu", "2dlu, $lgap, default, $lgap, top:176dlu, $lgap, default, $lgap, 16dlu, $lgap, 18dlu, $lgap, 16dlu, $lgap, 18dlu, $lgap, 4dlu")); ((FormLayout) benchFormContentPane.getLayout()).setRowGroups(new int[][] { { 9, 11, 13 } }); JCheckBox checkBox = new JCheckBox(); Font font = benchMenu.getFont().deriveFont(benchMenu.getFont().getStyle() | Font.BOLD, benchMenu.getFont().getSize() - 1f); Font labelFont = algoLabel.getFont().deriveFont(algoLabel.getFont().getStyle() | Font.BOLD, algoLabel.getFont().getSize() - 1f); Font checkFont = checkBox.getFont().deriveFont(checkBox.getFont().getStyle() | Font.BOLD, checkBox.getFont().getSize() - 1f); Font buttonFont = cancelButton.getFont().deriveFont(cancelButton.getFont().getStyle() | Font.BOLD); // ======== benchMenu ======== benchMenu.setText("Benchmark"); benchMenu.setFont(font);//from w ww.ja va2 s .com // ---- recommendedMenu ---- recommededMenu.setText("Recommended"); recommededMenu.setFont(font); recommededMenu.addActionListener((ActionEvent e) -> toptenMenuActionPerformed(e)); benchMenu.add(recommededMenu); // ---- primeMenu ---- primeMenu.setText("Prime"); primeMenu.setFont(font); primeMenu.addActionListener((ActionEvent e) -> primeMenuActionPerformed(e)); benchMenu.add(primeMenu); // ---- parallelMenu ---- parallelMenu.setText("Parallel"); parallelMenu.setFont(font); parallelMenu.addActionListener((ActionEvent e) -> parallelMenuActionPerformed(e)); benchMenu.add(parallelMenu); // ---- simpleMenu ---- simpleMenu.setText("Simple"); simpleMenu.setFont(font); simpleMenu.addActionListener((ActionEvent e) -> simpleMenuActionPerformed(e)); benchMenu.add(simpleMenu); // ---- lameMenu ---- lameMenu.setText("Lame"); lameMenu.setFont(font); lameMenu.addActionListener((ActionEvent e) -> lameMenuActionPerformed(e)); benchMenu.add(lameMenu); menuBar.add(benchMenu); // ======== ectMenu ======== ectMenu.setText("Ecetera"); ectMenu.setFont(font); // ---- sanityMenu ---- sanityMenu.setText("Sanity Check"); sanityMenu.setFont(font); sanityMenu.addActionListener((ActionEvent e) -> sanityMenuActionPerformed(e)); ectMenu.add(sanityMenu); ectMenu.addSeparator(); // ---- aboutMenu ---- aboutMenu.setText("About"); aboutMenu.setFont(font); aboutMenu.addActionListener((ActionEvent e) -> aboutMenuActionPerformed(e)); ectMenu.add(aboutMenu); menuBar.add(ectMenu); setJMenuBar(menuBar); // ---- algoLabel ---- algoLabel.setText("Algorithm"); algoLabel.setFont(labelFont); benchFormContentPane.add(algoLabel, new CellConstraints(5, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(0, 12, 0, 0))); // ---- logToFileCheckBox ---- logToFileCheckBox.setText("Log To File"); logToFileCheckBox.setFont(checkFont); benchFormContentPane.add(logToFileCheckBox, new CellConstraints(8, 3, 3, 1, CellConstraints.LEFT, CellConstraints.DEFAULT, new Insets(0, 8, 0, 0))); // ---- showValueCheckBox ---- showValueCheckBox.setText("Show Value"); showValueCheckBox.setFont(checkFont); benchFormContentPane.add(showValueCheckBox, cc.xywh(10, 3, 3, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ---- verboseCheckBox ---- verboseCheckBox.setText("Verbose"); verboseCheckBox.setFont(checkFont); benchFormContentPane.add(verboseCheckBox, new CellConstraints(14, 3, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT, new Insets(0, 4, 0, 0))); // ---- startLabel ---- startLabel.setText("Start"); startLabel.setFont(labelFont); benchFormContentPane.add(startLabel, cc.xywh(8, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ---- startField ---- startField.setToolTipText("Enter start value of n"); startField.setText("8000"); benchFormContentPane.add(startField, cc.xy(10, 9)); // ---- stepLabel ---- stepLabel.setText("Stepfactor"); stepLabel.setFont(labelFont); benchFormContentPane.add(stepLabel, cc.xywh(8, 11, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ---- stepBox ---- stepBox.setEditable(true); DefaultComboBoxModel dcbm = new DefaultComboBoxModel(new String[] { "1.5", "2.0", "2.5", "3.0" }); stepBox.setModel(dcbm); stepBox.setSelectedIndex(1); benchFormContentPane.add(stepBox, cc.xy(10, 11)); // ---- cancelButton ---- cancelButton.setText("Cancel"); cancelButton.setEnabled(false); cancelButton.setBackground(SystemColor.activeCaption); cancelButton.setForeground(SystemColor.window); cancelButton.setFont(buttonFont); cancelButton.addActionListener((ActionEvent e) -> cancelButtonActionPerformed(e)); benchFormContentPane.add(cancelButton, cc.xywh(14, 11, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); // ---- lenghtLabel ---- lenghtLabel.setText("Length"); lenghtLabel.setFont(labelFont); benchFormContentPane.add(lenghtLabel, cc.xywh(8, 13, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ---- lenghtSpinner ---- lenghtSpinner.setModel(new SpinnerListModel(new String[] { "1", "2", "3", "4", "5", "6", "7", "8", "9" })); benchFormContentPane.add(lenghtSpinner, cc.xy(10, 13)); // ---- benchmarkButton ---- benchmarkButton.setText("Benchmark!"); benchmarkButton.setFont(buttonFont); benchmarkButton.addActionListener((ActionEvent e) -> benchmarkButtonActionPerformed(e)); benchFormContentPane.add(benchmarkButton, cc.xywh(14, 13, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); // ======== AlgoSelection ======== algoSelection.setPreferredSize(new Dimension(47, 550)); algoSelection.setBackground(SystemColor.window); algoSelection.setLayout(new FormLayout("left:default:grow", "21*(fill:default)")); for (int i = 0; i < checkBoxArray.length; i++) { checkBox = new JCheckBox(); checkBox.setText(FactorialTest.getNames()[i]); checkBox.setBackground(SystemColor.window); checkBox.setMargin(new Insets(3, 4, 1, 0)); algoSelection.add(checkBox, cc.xy(1, i + 1)); checkBox.setFont(checkFont); checkBoxArray[i] = checkBox; } benchFormContentPane.add(algoSelection, cc.xywh(3, 5, 3, 9)); // ---- textArea ---- textArea.setLineWrap(true); textArea.setEditable(false); textArea.setDisabledTextColor(SystemColor.windowText); textArea.setBackground(SystemColor.window); textArea.setFont(new Font("Courier New", Font.PLAIN, 12)); // ======== scrollPane ======== scrollPane.setViewportView(textArea); benchFormContentPane.add(scrollPane, cc.xywh(7, 5, 9, 3)); // ---- infoLabel ---- infoLabel.setText("(c) 2008 Peter Luschny"); infoLabel.setFont(labelFont); benchFormContentPane.add(infoLabel, cc.xywh(3, 15, 3, 1)); benchFormContentPane.add(progressBar, cc.xywh(7, 15, 9, 1)); pack(); setLocationRelativeTo(getOwner()); }
From source file:demo.MainScreen.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Evaluation license - Travis Holt watch = new StopWatch(); TeamTitleLabel = new JLabel(); FilterItemLabel = new JLabel(); separator1 = new JSeparator(); panel2 = new JPanel(); comboBox1 = new JComboBox(); textField1 = new JTextField(); startTiming = new JButton(); beingTimed = false;// ww w .j av a2s . co m panel1 = new JPanel(); DockButton_Jacket = new JButton(); DockButton_CShirt = new JButton(); DockButton_TShirt = new JButton(); DockButton_TTop = new JButton(); DockButton_Dress = new JButton(); DockButton_Pants = new JButton(); DockButton_Uwear = new JButton(); DockLabel_Jacket = new JLabel(); DockLabel_CShirt = new JLabel(); DockLabel_TShirt = new JLabel(); DockLabel_TTop = new JLabel(); DockLabel_Dress = new JLabel(); DockLabel_Pants = new JLabel(); DockLabel_UWear = new JLabel(); separator2 = new JSeparator(); Frame_ShirtFilter = new JInternalFrame(); Label_Options = new JLabel(); vSpacer2 = new JPanel(null); Label_SizeSelection = new JLabel(); splitPane2 = new JSplitPane(); Label_SizeStatus = new JLabel(); SizeButton_Clear = new JButton(); ColorPalette_Clear = new JButton(); panel6 = new JPanel(); SizeButton_XS = new JButton(); SizeButton_S = new JButton(); SizeButton_M = new JButton(); SizeButton_L = new JButton(); SizeButton_XL = new JButton(); vSpacer1 = new JPanel(null); Label_ColorSelection = new JLabel(); splitPane1 = new JSplitPane(); Label_ColorStatus = new JButton(); ColorButton_Clear = new JButton(); colorPalette = new JPanel(); Button_Black = new JButton(); Button_Pink = new JButton(); Button_Blue = new JButton(); Button_Green = new JButton(); ButtonLightBlue = new JButton(); Button_Red = new JButton(); Button_Purple = new JButton(); Button_Grey = new JButton(); Button_Yellow = new JButton(); Button_White = new JButton(); vSpacer3 = new JPanel(null); Label_PriceSelection = new JLabel(); splitPane3 = new JSplitPane(); Label_PriceStatus = new JLabel(); PriceButton_Clear = new JButton(); panel8 = new JPanel(); bPrice26_50 = new JButton(); bPrice51_75 = new JButton(); bPrice76_100 = new JButton(); bprice101_125 = new JButton(); DesignB = new JInternalFrame(); label1 = new JLabel(); label2 = new JLabel(); sizeButtonPanel = new JPanel(); Toggle_XS = new JToggleButton(); Toggle_S = new JToggleButton(); Toggle_M = new JToggleButton(); Toggle_L = new JToggleButton(); Toggle_XL = new JToggleButton(); vSpacer4 = new JPanel(null); colorLabelPalette = new JLabel(); panel4 = new JPanel(); primaryColorChooser = new ColorChooser(); vSpacer5 = new JPanel(null); priceRangeLabel = new JLabel(); rangeMinLabel = new JTextField(); rangeSlider1 = new RangeSlider(); rangeMaxLabel = new JTextField(); CellConstraints cc = new CellConstraints(); //======== this ======== setTitle("Fashion Sensible"); Container contentPane = getContentPane(); contentPane.setLayout( new FormLayout("default, $lcgap, 195dlu, $lcgap, default, $lcgap, 149dlu, $lcgap, default", "7*(default, $lgap), 253dlu, 2*($lgap, default)")); //---- TeamTitleLabel ---- TeamTitleLabel.setText("Fashion Sensible"); TeamTitleLabel.setFont(new Font("Dialog", Font.PLAIN, 16)); contentPane.add(TeamTitleLabel, cc.xywh(5, 3, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- FilterItemLabel ---- FilterItemLabel.setText("Filtering Items"); contentPane.add(FilterItemLabel, cc.xywh(5, 5, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); contentPane.add(separator1, cc.xy(5, 7)); //======== panel2 ======== { // JFormDesigner evaluation mark panel2.setBorder(new javax.swing.border.CompoundBorder( new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0), "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.BOTTOM, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.red), panel2.getBorder())); panel2.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent e) { if ("border".equals(e.getPropertyName())) throw new RuntimeException(); } }); panel2.setLayout(new FormLayout("51dlu, $lcgap, 54dlu", "default, $lgap, default")); //---- comboBox1 ---- comboBox1.setModel(new DefaultComboBoxModel(new String[] { "<Design>", "Design A", "Design B" })); comboBox1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { comboBox1ActionPerformed(e); } }); panel2.add(comboBox1, cc.xy(1, 1)); panel2.add(textField1, cc.xy(3, 1)); //---- button1 ---- startTiming.setText("Start"); startTiming.setBackground(Color.green); startTiming.addMouseListener(new MouseListener() { public void mouseReleased(MouseEvent e) { } public void mousePressed(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mouseEntered(MouseEvent e) { } public void mouseClicked(MouseEvent e) { if (!beingTimed) { resetDesigns(false); tasksRun++; beingTimed = true; watch.start(); System.out.println("***Task #" + tasksRun); startTiming.setText("Stop"); startTiming.setBackground(Color.red); } else { beingTimed = false; watch.stop(); resetDesigns(true); System.out.println("Time Taken: " + watch.getElapsedTimeSecs() + " seconds"); System.out.println("***End of Task #" + tasksRun + "\n"); startTiming.setBackground(Color.green); startTiming.setText("Start"); } } }); panel2.add(startTiming, cc.xy(1, 3)); } contentPane.add(panel2, cc.xywh(3, 9, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //======== panel1 ======== { panel1.setLayout(new FormLayout("6*(default, $lcgap), default", "2*(default)")); //---- DockButton_Jacket ---- DockButton_Jacket.setIcon(new ImageIcon(getClass().getResource("/Assets/DockItems/Jackets.png"))); DockButton_Jacket.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { DockButton_JacketMouseClicked(e); } }); panel1.add(DockButton_Jacket, cc.xy(1, 1)); //---- DockButton_CShirt ---- DockButton_CShirt .setIcon(new ImageIcon(getClass().getResource("/Assets/DockItems/CollaredShirts.png"))); DockButton_CShirt.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { DockButton_CShirtMouseClicked(e); } }); panel1.add(DockButton_CShirt, cc.xy(3, 1)); //---- DockButton_TShirt ---- DockButton_TShirt.setIcon(new ImageIcon(getClass().getResource("/Assets/DockItems/Shirt.png"))); DockButton_TShirt.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { DockButton_TShirtMouseClicked(e); } }); panel1.add(DockButton_TShirt, cc.xy(5, 1)); //---- DockButton_TTop ---- DockButton_TTop.setIcon(new ImageIcon(getClass().getResource("/Assets/DockItems/TankTop.png"))); DockButton_TTop.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { DockButton_TTopMouseClicked(e); } }); panel1.add(DockButton_TTop, cc.xy(7, 1)); //---- DockButton_Dress ---- DockButton_Dress.setIcon(new ImageIcon(getClass().getResource("/Assets/DockItems/Dresses.png"))); DockButton_Dress.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { DockButton_DressMouseClicked(e); } }); panel1.add(DockButton_Dress, cc.xy(9, 1)); //---- DockButton_Pants ---- DockButton_Pants.setIcon(new ImageIcon(getClass().getResource("/Assets/DockItems/Pants.png"))); DockButton_Pants.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { DockButton_PantsMouseClicked(e); } }); panel1.add(DockButton_Pants, cc.xy(11, 1)); //---- DockButton_Uwear ---- DockButton_Uwear.setIcon(new ImageIcon(getClass().getResource("/Assets/DockItems/underwear.png"))); DockButton_Uwear.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { DockButton_UwearMouseClicked(e); } }); panel1.add(DockButton_Uwear, cc.xy(13, 1)); //---- DockLabel_Jacket ---- DockLabel_Jacket.setText("Jackets"); DockLabel_Jacket.setEnabled(false); panel1.add(DockLabel_Jacket, cc.xywh(1, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- DockLabel_CShirt ---- DockLabel_CShirt.setText("Collared Shirts"); DockLabel_CShirt.setEnabled(false); panel1.add(DockLabel_CShirt, cc.xywh(3, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- DockLabel_TShirt ---- DockLabel_TShirt.setText("T-Shirts"); DockLabel_TShirt.setEnabled(false); panel1.add(DockLabel_TShirt, cc.xywh(5, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- DockLabel_TTop ---- DockLabel_TTop.setText("Tank Tops"); DockLabel_TTop.setEnabled(false); panel1.add(DockLabel_TTop, cc.xywh(7, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- DockLabel_Dress ---- DockLabel_Dress.setText("Dresses"); DockLabel_Dress.setEnabled(false); panel1.add(DockLabel_Dress, cc.xywh(9, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- DockLabel_Pants ---- DockLabel_Pants.setText("Pants"); DockLabel_Pants.setEnabled(false); panel1.add(DockLabel_Pants, cc.xywh(11, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- DockLabel_UWear ---- DockLabel_UWear.setText("Underwear"); DockLabel_UWear.setEnabled(false); panel1.add(DockLabel_UWear, cc.xywh(13, 2, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); } contentPane.add(panel1, cc.xy(5, 9)); contentPane.add(separator2, cc.xy(5, 11)); //======== Frame_ShirtFilter ======== { Frame_ShirtFilter.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); Frame_ShirtFilter.setTitle("Design A"); Container Frame_ShirtFilterContentPane = Frame_ShirtFilter.getContentPane(); Frame_ShirtFilterContentPane.setLayout(new FormLayout("default, $lcgap, 85dlu, $lcgap, default", "default, $lgap, [8dlu,default], 2*($lgap, default), $lgap, 10dlu, 2*($lgap, default), $lgap, 11dlu, 3*($lgap, default)")); //---- Label_Options ---- Label_Options.setText("Options"); Label_Options.setFont(new Font("Dialog", Font.BOLD, 14)); Frame_ShirtFilterContentPane.add(Label_Options, cc.xy(3, 1)); Frame_ShirtFilterContentPane.add(vSpacer2, cc.xy(3, 3)); //---- Label_SizeSelection ---- Label_SizeSelection.setText("Size:"); Frame_ShirtFilterContentPane.add(Label_SizeSelection, cc.xy(1, 5)); //======== splitPane2 ======== { //---- Label_SizeStatus ---- Label_SizeStatus.setText("--"); splitPane2.setLeftComponent(Label_SizeStatus); //---- SizeButton_Clear ---- SizeButton_Clear.setText("Clear"); SizeButton_Clear.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { coverFlow().resetSizes(true); Label_SizeStatus.setText("--"); } }); splitPane2.setRightComponent(SizeButton_Clear); } Frame_ShirtFilterContentPane.add(splitPane2, cc.xywh(3, 5, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //======== panel6 ======== { panel6.setLayout(new FormLayout("[16dlu,min], [16dlu,default], 3*([16dlu,min])", "default")); //---- SizeButton_XS ---- SizeButton_XS.setText("XS"); SizeButton_XS.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { SizeButton_XSMouseClicked(e); } }); panel6.add(SizeButton_XS, cc.xy(1, 1)); //---- SizeButton_S ---- SizeButton_S.setText("S"); SizeButton_S.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { SizeButton_SMouseClicked(e); } }); panel6.add(SizeButton_S, cc.xy(2, 1)); //---- SizeButton_M ---- SizeButton_M.setText("M"); SizeButton_M.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { SizeButton_MMouseClicked(e); } }); panel6.add(SizeButton_M, cc.xy(3, 1)); //---- SizeButton_L ---- SizeButton_L.setText("L"); SizeButton_L.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { SizeButton_LMouseClicked(e); } }); panel6.add(SizeButton_L, cc.xy(4, 1)); //---- SizeButton_XL ---- SizeButton_XL.setText("XL"); SizeButton_XL.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { SizeButton_XLMouseClicked(e); } }); panel6.add(SizeButton_XL, cc.xy(5, 1)); } Frame_ShirtFilterContentPane.add(panel6, cc.xywh(3, 7, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); Frame_ShirtFilterContentPane.add(vSpacer1, cc.xy(3, 9)); //---- Label_ColorSelection ---- Label_ColorSelection.setText("Color:"); Frame_ShirtFilterContentPane.add(Label_ColorSelection, cc.xy(1, 11)); //======== splitPane1 ======== { //---- Label_ColorStatus ---- Label_ColorStatus.setText(" "); Label_ColorStatus.setEnabled(false); splitPane1.setLeftComponent(Label_ColorStatus); //---- ColorButton_Clear ---- ColorButton_Clear.setText("Clear"); ColorButton_Clear.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { ColorButton_ClearMouseClicked(e); } }); splitPane1.setRightComponent(ColorButton_Clear); } Frame_ShirtFilterContentPane.add(splitPane1, cc.xywh(3, 11, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //======== panel7 ======== { colorPalette.setLayout(new FormLayout("9*(default)", "2*(default)")); //---- Button_Black ---- Button_Black.setText(" "); Button_Black.setBackground(Color.black); Button_Black.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { Button_BlackMouseClicked(e); } }); colorPalette.add(Button_Black, cc.xy(1, 1)); //---- Button_White ---- Button_White.setText(" "); Button_White.setBackground(Color.white); Button_White.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { Button_WhiteMouseClicked(e); } }); colorPalette.add(Button_White, cc.xy(1, 2)); //---- Button_Red ---- Button_Red.setText(" "); Button_Red.setBackground(Color.red); Button_Red.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { Button_RedMouseClicked(e); } }); colorPalette.add(Button_Red, cc.xy(3, 1)); //---- Button_Pink ---- Button_Pink.setText(" "); Button_Pink.setBackground(new Color(255, 31, 229)); Button_Pink.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { ButtonPinkButtonClicked(e); } }); colorPalette.add(Button_Pink, cc.xy(2, 2)); //---- Button_Purple ---- Button_Purple.setText(" "); Button_Purple.setBackground(new Color(94, 61, 155)); Button_Purple.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { Button_PurpleMouseClicked(e); } }); colorPalette.add(Button_Purple, cc.xy(5, 2)); //---- Button_Yellow ---- Button_Yellow.setText(" "); Button_Yellow.setBackground(Color.yellow); Button_Yellow.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { Button_YellowMouseClicked(e); } }); colorPalette.add(Button_Yellow, cc.xy(3, 2)); //---- Button_Green ---- Button_Green.setText(" "); Button_Green.setBackground(new Color(54, 127, 31)); Button_Green.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { Button_GreenMouseClicked(e); } }); colorPalette.add(Button_Green, cc.xy(4, 1)); //---- Button Light Blue ---- ButtonLightBlue.setText(" "); ButtonLightBlue.setBackground(new Color(111, 247, 255)); ButtonLightBlue.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { ButtonLightBlue(e); } }); colorPalette.add(ButtonLightBlue, cc.xy(4, 2)); //---- Button_Blue ---- Button_Blue.setText(" "); Button_Blue.setBackground(Color.blue); Button_Blue.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { Button_BlueMouseClicked(e); } }); colorPalette.add(Button_Blue, cc.xy(5, 1)); Button_Grey.setText(" "); Button_Grey.setBackground(new Color(198, 198, 198)); Button_Grey.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { Button_GreyMouseClicked(e); } }); colorPalette.add(Button_Grey, cc.xy(2, 1)); } Frame_ShirtFilterContentPane.add(colorPalette, cc.xy(3, 13)); Frame_ShirtFilterContentPane.add(vSpacer3, cc.xy(3, 15)); //---- Label_PriceSelection ---- Label_PriceSelection.setText("Price:"); Frame_ShirtFilterContentPane.add(Label_PriceSelection, cc.xy(1, 17)); //======== splitPane3 ======== { //---- Label_PriceStatus ---- Label_PriceStatus.setText("------------"); splitPane3.setLeftComponent(Label_PriceStatus); //---- PriceButton_Clear ---- PriceButton_Clear.setText("Clear"); PriceButton_Clear.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { PriceButton_ClearMouseClicked(e); } }); splitPane3.setRightComponent(PriceButton_Clear); } Frame_ShirtFilterContentPane.add(splitPane3, cc.xywh(3, 17, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //======== panel8 ======== { panel8.setLayout(new FormLayout("default", "3*(default, $lgap), default")); //---- Button_Price25_49 ---- bPrice26_50.setText("$26-$50"); bPrice26_50.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { setPrice26_50(e); } }); panel8.add(bPrice26_50, cc.xy(1, 1)); //---- Button_Price51_75 ---- bPrice51_75.setText("$51-$75"); bPrice51_75.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { setPrice51_75(e); } }); panel8.add(bPrice51_75, cc.xy(1, 3)); //---- Button_Price 76-100---- bPrice76_100.setText("$76-$100"); bPrice76_100.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { setPrice76_100(e); } }); panel8.add(bPrice76_100, cc.xy(1, 5)); //---- Button_PriceMore100 ---- bprice101_125.setText("$101-$125"); bprice101_125.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { setPrice101_125(e); } }); panel8.add(bprice101_125, cc.xy(1, 7)); } Frame_ShirtFilterContentPane.add(panel8, cc.xy(3, 19)); } contentPane.add(Frame_ShirtFilter, cc.xywh(3, 13, 1, 5)); //======== internalFrame1 ======== { DesignB.setTitle("Design B"); Container internalFrame1ContentPane = DesignB.getContentPane(); internalFrame1ContentPane.setLayout(new FormLayout( "2*(default, $lcgap), 20dlu, $lcgap, default, $lcgap, 22dlu, 4*($lcgap, default)", "4*(default, $lgap), 47dlu, 2*($lgap, default), $lgap, 26dlu, 10*($lgap, default)")); //---- label1 ---- label1.setText("Options"); internalFrame1ContentPane.add(label1, cc.xy(3, 3)); //---- label2 ---- label2.setText("Size"); internalFrame1ContentPane.add(label2, cc.xy(3, 5)); //======== Size Toggle Panel ======== { sizeButtonPanel.setLayout(new FormLayout("16dlu, 4*([16dlu,default])", "default")); //---- Toggle_XS ---- Toggle_XS.setText("XS"); Toggle_XS.addMouseListener(new MouseListener() { public void mouseReleased(MouseEvent e) { } public void mousePressed(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mouseEntered(MouseEvent e) { } public void mouseClicked(MouseEvent e) { if (Toggle_XS.getSelectedObjects() != null) { coverFlow().addFilterSize("XS"); } else { coverFlow().removeFilterSize("XS"); } } }); sizeButtonPanel.add(Toggle_XS, cc.xy(1, 1)); //---- Toggle_S ---- Toggle_S.setText("S"); Toggle_S.addMouseListener(new MouseListener() { public void mouseReleased(MouseEvent e) { } public void mousePressed(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mouseEntered(MouseEvent e) { } public void mouseClicked(MouseEvent e) { if (Toggle_S.getSelectedObjects() != null) { coverFlow().addFilterSize("S"); } else { coverFlow().removeFilterSize("S"); } } }); sizeButtonPanel.add(Toggle_S, cc.xy(2, 1)); //---- Toggle_M ---- Toggle_M.setText("M"); Toggle_M.addMouseListener(new MouseListener() { public void mouseReleased(MouseEvent e) { } public void mousePressed(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mouseEntered(MouseEvent e) { } public void mouseClicked(MouseEvent e) { if (Toggle_M.getSelectedObjects() != null) { coverFlow().addFilterSize("M"); } else { coverFlow().removeFilterSize("M"); } } }); sizeButtonPanel.add(Toggle_M, cc.xy(3, 1)); //---- Toggle_L ---- Toggle_L.setText("L"); Toggle_L.addMouseListener(new MouseListener() { public void mouseReleased(MouseEvent e) { } public void mousePressed(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mouseEntered(MouseEvent e) { } public void mouseClicked(MouseEvent e) { if (Toggle_L.getSelectedObjects() != null) { coverFlow().addFilterSize("L"); } else { coverFlow().removeFilterSize("L"); } } }); sizeButtonPanel.add(Toggle_L, cc.xy(4, 1)); //---- Toggle_XL ---- Toggle_XL.setText("XL"); Toggle_XL.addMouseListener(new MouseListener() { public void mouseReleased(MouseEvent e) { } public void mousePressed(MouseEvent e) { } public void mouseExited(MouseEvent e) { } public void mouseEntered(MouseEvent e) { } public void mouseClicked(MouseEvent e) { if (Toggle_XL.getSelectedObjects() != null) { coverFlow().addFilterSize("XL"); } else { coverFlow().removeFilterSize("XL"); } } }); sizeButtonPanel.add(Toggle_XL, cc.xy(5, 1)); } internalFrame1ContentPane.add(sizeButtonPanel, cc.xy(7, 5)); internalFrame1ContentPane.add(vSpacer4, cc.xy(7, 7)); //---- Color Label Palette ---- colorLabelPalette.setText("Color Palette"); internalFrame1ContentPane.add(colorLabelPalette, cc.xy(3, 9)); //======== panel4 ======== { panel4.setLayout(new FormLayout("23dlu, $lcgap, default", "22dlu, $lgap, default")); //---- Color Chooser #1 ---- primaryColorChooser.setToolTipText("Click and hold to select a color from the rainbow palette"); primaryColorChooser.setColor(Color.gray); primaryColorChooser.addPropertyChangeListener(new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent evt) { try { Color color = (Color) evt.getNewValue(); coverFlow().resetColors(false); coverFlow().addFilterColor(colorToString(color), false); } catch (Exception e) { } } }); primaryColorChooser.addMouseListener(new MouseListener() { @Override public void mouseReleased(MouseEvent e) { coverFlow().incrementRouteCounter(); } @Override public void mousePressed(MouseEvent e) { // TODO Auto-generated method stub } @Override public void mouseExited(MouseEvent e) { // TODO Auto-generated method stub } @Override public void mouseEntered(MouseEvent e) { // TODO Auto-generated method stub } @Override public void mouseClicked(MouseEvent e) { // TODO Auto-generated method stub } }); panel4.add(primaryColorChooser, cc.xy(1, 1)); ColorPalette_Clear.setText("Clear"); ColorPalette_Clear.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent e) { primaryColorChooser.setColor(Color.gray); coverFlow().resetColors(true); } }); panel4.add(ColorPalette_Clear, cc.xy(3, 1)); } internalFrame1ContentPane.add(panel4, cc.xywh(7, 9, 1, 1, CellConstraints.DEFAULT, CellConstraints.BOTTOM)); internalFrame1ContentPane.add(vSpacer5, cc.xy(7, 11)); //---- label4 ---- priceRangeLabel.setText("Price Range"); internalFrame1ContentPane.add(priceRangeLabel, cc.xy(3, 15)); //---- textField2 ---- rangeMinLabel.setText("25"); rangeMinLabel.setEditable(false); internalFrame1ContentPane.add(rangeMinLabel, cc.xy(5, 15)); //---- rangeSlider1 ---- rangeSlider1.setMaximum(125); rangeSlider1.setMinimum(25); rangeSlider1.setHighValue(125); rangeSlider1.setLowValue(25); rangeSlider1.setPaintTicks(true); rangeSlider1.setPaintLabels(true); rangeSlider1.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent e) { rangeSlider1StateChanged(e); } }); rangeSlider1.addMouseListener(new MouseListener() { @Override public void mouseReleased(MouseEvent e) { coverFlow().incrementRouteCounter(); } @Override public void mousePressed(MouseEvent e) { // TODO Auto-generated method stub } @Override public void mouseExited(MouseEvent e) { // TODO Auto-generated method stub } @Override public void mouseEntered(MouseEvent e) { // TODO Auto-generated method stub } @Override public void mouseClicked(MouseEvent e) { // TODO Auto-generated method stub } }); internalFrame1ContentPane.add(rangeSlider1, cc.xy(7, 15)); //---- RangeMaxLabel ---- rangeMaxLabel.setText("125"); rangeMaxLabel.setEditable(false); internalFrame1ContentPane.add(rangeMaxLabel, cc.xy(9, 15)); } contentPane.add(DesignB, cc.xywh(3, 15, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP)); setSize(1475, 715); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents setupCoverFlows(this, cc); }
From source file:demo.MainScreen.java
public void setupCoverFlows(Container container, CellConstraints cc) { femaleCoverFlow.setPreferredSize(new Dimension(800, 300)); femaleCoverFlow.addListener(new ShapeListener() { public void shapeClicked(ShapeEvent e) { MouseEvent me = e.getMouseEvent(); if (!me.isConsumed() && me.getButton() == MouseEvent.BUTTON1 && me.getClickCount() == 1) { System.out.println(e.getShape()); //TODO Add some feedback to let them know they actually clicked something Picture pic = (Picture) e.getShape(); }/*from w w w. j a v a 2 s. c o m*/ } @Override public void shapeActivated(ShapeEvent e) { } @Override public void shapeDeactivated(ShapeEvent e) { } }); femaleCoverFlow.setPreferredSize(new Dimension(800, 300)); femaleCoverFlow.addListener(new ShapeListener() { public void shapeClicked(ShapeEvent e) { MouseEvent me = e.getMouseEvent(); if (!me.isConsumed() && me.getButton() == MouseEvent.BUTTON1 && me.getClickCount() == 1) { Picture pic = (Picture) e.getShape(); if (pic.isSelected()) { pic.unselect(); } else { pic.select(); System.out.println(e.getShape()); } coverFlow().updateShapes(); } } @Override public void shapeActivated(ShapeEvent e) { } @Override public void shapeDeactivated(ShapeEvent e) { } }); maleCoverFlow.setPreferredSize(new Dimension(800, 300)); maleCoverFlow.addListener(new ShapeListener() { public void shapeClicked(ShapeEvent e) { MouseEvent me = e.getMouseEvent(); if (!me.isConsumed() && me.getButton() == MouseEvent.BUTTON1 && me.getClickCount() == 1) { Picture pic = (Picture) e.getShape(); if (pic.isSelected()) { pic.unselect(); } else { pic.select(); System.out.println(e.getShape()); } coverFlow().updateShapes(); } } @Override public void shapeActivated(ShapeEvent e) { } @Override public void shapeDeactivated(ShapeEvent e) { } }); isMale = true; femaleCoverFlow.setVisible(false); container.add(femaleCoverFlow, cc.xywh(5, 13, 1, 6, CellConstraints.RIGHT, CellConstraints.DEFAULT)); container.add(maleCoverFlow, cc.xywh(5, 13, 1, 6, CellConstraints.RIGHT, CellConstraints.DEFAULT)); }
From source file:editor.TABS.java
private void initComponents() { initLayoutEditorsList(DELAULT_FLOORS_COUNT); panelFloors = new JPanel(); scrollPane_floors = new JScrollPane(); // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Evaluation license - sz gajek menuBar1 = new JMenuBar(); menu1 = new JMenu(); open_menuItem = new JMenuItem(); import_menuItem = new JMenuItem(); save_menuItem = new JMenuItem(); clear_menuItem = new JMenuItem(); exit_menuItem = new JMenuItem(); menu2 = new JMenu(); settings_menuItem = new JMenuItem(); menu3 = new JMenu(); about_menuItem = new JMenuItem(); helpLayout_menuItem = new JMenuItem(); helpHyper_menuItem = new JMenuItem(); helpTests_menuItem = new JMenuItem(); panel5 = new JPanel(); panel5 = new JPanel(); panel4 = new JPanel(); zoomInButton = new JButton(); zoomOutButton = new JButton(); zoomLabel = new JLabel(); label5 = new JLabel(); RoomLabel = new JTextField(); label9 = new JLabel(); roomTypes = new JComboBox(); initRoomTypeList();/* w ww . j a va 2s.c o m*/ label8 = new JLabel(); areaValueLabel = new JLabel(); tabbedPane1 = new JTabbedPane(); panel1 = new JPanel(); scrollPane1 = new JScrollPane(); panel6 = new JPanel(); SolidMode = new JButton(); DashedMode = new JButton(); showHideLineLen = new JButton(); addDoorsbutton = new JButton(); undoButton = new JButton(); clearButton2 = new JButton(); panel7 = new JPanel(); label10 = new JLabel(); scrollPane6 = new JScrollPane(); validationMessage = new JTextArea(); panel2 = new JPanel(); scrollPane2 = new JScrollPane(); hyperGraphEditor = new HyperGraphEditor(); panel3 = new JPanel(); validationEditor = new ValidationEditor(); label7 = new JLabel(); label6 = new JLabel(); scrollPane5 = new JScrollPane(); fileChooseingList = new JList(); scrollPane3 = new JScrollPane(); filesList = new JList(); scrollPane4 = new JScrollPane(); panel10 = new JPanel(); fileNameLabel = new JLabel(); fileContent = new JTextArea(); saveFileButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setBackground(new Color(102, 102, 255)); setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); setIconImage(((ImageIcon) UIManager.getIcon("Tree.leafIcon")).getImage()); setTitle("HSSDR"); Container contentPane = getContentPane(); contentPane.setLayout(new FormLayout("left:57dlu, $lcgap, 493dlu, $lcgap, right:12dlu:grow", "top:4dlu, $lgap, fill:[380dlu,default]")); //======== menuBar1 ======== { //======== menu1 ======== { menu1.setText("File"); //---- open_menuItem ---- open_menuItem.setText("Open"); open_menuItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { open_menuItemActionPerformed(e); } }); menu1.add(open_menuItem); //---- import_menuItem ---- import_menuItem.setText("Import Outline"); import_menuItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { import_menuItemActionPerformed(e); } }); menu1.add(import_menuItem); //---- save_menuItem ---- save_menuItem.setText("Save"); menu1.add(save_menuItem); //---- clear_menuItem ---- clear_menuItem.setText("Clear"); clear_menuItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { clear_menuItemActionPerformed(e); } }); menu1.add(clear_menuItem); //---- exit_menuItem ---- exit_menuItem.setText("Exit"); exit_menuItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { exit_menuItemActionPerformed(e); } }); menu1.add(exit_menuItem); } menuBar1.add(menu1); //======== menu2 ======== { menu2.setText("Settings"); //---- settings_menuItem ---- settings_menuItem.setText("Settings"); settings_menuItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { settings_menuItemActionPerformed(e); } }); menu2.add(settings_menuItem); } menuBar1.add(menu2); //======== menu3 ======== { menu3.setText("Help"); //---- about_menuItem ---- about_menuItem.setText("About"); about_menuItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { about_menuItemActionPerformed(e); } }); menu3.add(about_menuItem); //---- helpLayout_menuItem ---- helpLayout_menuItem.setText("Layout Sketching"); menu3.add(helpLayout_menuItem); //---- helpHyper_menuItem ---- helpHyper_menuItem.setText("Hypergraphs"); menu3.add(helpHyper_menuItem); //---- helpTests_menuItem ---- helpTests_menuItem.setText("Project Testing"); helpTests_menuItem.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { helpTests_menuItemActionPerformed(e); } }); menu3.add(helpTests_menuItem); } menuBar1.add(menu3); } setJMenuBar(menuBar1); //======== panel5 ======== { panel5.setLayout(new GridBagLayout()); ((GridBagLayout) panel5.getLayout()).columnWidths = new int[] { 8, 85, 0, 0 }; ((GridBagLayout) panel5.getLayout()).rowHeights = new int[] { 29, 23, 23, 23, 23, 32, 23, 32, 33, 32, 33, 0 }; ((GridBagLayout) panel5.getLayout()).columnWeights = new double[] { 0.0, 0.0, 0.0, 1.0E-4 }; ((GridBagLayout) panel5.getLayout()).rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0E-4 }; // panel5.add(zoomMode, new GridBagConstraints(1, 0, 2, 1, 0.0, 0.0, // GridBagConstraints.CENTER, GridBagConstraints.BOTH, // new Insets(0, 0, 3, 0), 0, 0)); // panel5.add(zoomLabel, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, // GridBagConstraints.CENTER, GridBagConstraints.BOTH, // new Insets(0, 0, 3, 3), 0, 0)); //======== panel4 ======== { panel4.setLayout(new FormLayout("2*(default)", "default")); //---- zoomInButton ---- zoomInButton.setText("+"); zoomInButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { zoomInButtonActionPerformed(e); } }); panel4.add(zoomInButton, cc.xy(1, 1)); //---- zoomOutButton ---- zoomOutButton.setText("-"); zoomOutButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { zoomOutButtonActionPerformed(e); } }); panel4.add(zoomOutButton, cc.xy(2, 1)); } panel5.add(panel4, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 3, 3), 0, 0)); panel5.add(zoomLabel, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 3, 3), 0, 0)); //---- label5 ---- label5.setText("Area Label"); panel5.add(label5, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 3, 3), 0, 0)); //---- RoomLabel ---- RoomLabel.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { RoomLabelFocusLost(e); } }); panel5.add(RoomLabel, new GridBagConstraints(1, 3, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 3, 3), 0, 0)); //---- label9 ---- label9.setText("Area type"); panel5.add(label9, new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 3, 3), 0, 0)); //---- roomTypes ---- roomTypes.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { roomTypesActionPerformed(e); } }); roomTypes.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { roomTypesMouseClicked(e); } }); roomTypes.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { roomTypesFocusLost(e); } }); panel5.add(roomTypes, new GridBagConstraints(1, 5, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 3, 3), 0, 0)); //---- label8 ---- label8.setText("Area [m2]:"); panel5.add(label8, new GridBagConstraints(1, 6, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 3, 3), 0, 0)); panel5.add(areaValueLabel, new GridBagConstraints(1, 7, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 3), 0, 0)); //---- label8 ----; labelFloors = new JLabel(); labelFloors.setText("Floor"); panel5.add(labelFloors, new GridBagConstraints(1, 8, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 3, 3), 0, 0)); //---- roomTypes ---- floorsCombo = new JComboBox(); initFloorsCombo(); floorsCombo.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { floorsComboActionPerformed(e); } }); floorsCombo.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { floorsComboMouseClicked(e); } }); floorsCombo.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { floorsComboFocusLost(e); } }); panel5.add(floorsCombo, new GridBagConstraints(1, 9, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 3), 0, 0)); } contentPane.add(panel5, cc.xywh(1, 3, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //======== tabbedPane1 ======== { tabbedPane1.setFont(new Font("Tahoma", Font.BOLD, 14)); //======== panel1 ======== { panel1.setBackground(Color.white); panel1.setLayout(new FormLayout("491dlu", "fill:266dlu, 36dlu, $lgap, default")); //======== scrollPane1 ======== { //---- layoutEditor ---- scrollPane1.setViewportView(currentLayoutEditor); } panel1.add(scrollPane1, cc.xywh(1, 1, 1, 1, CellConstraints.CENTER, CellConstraints.CENTER)); //======== panel6 ======== { panel6.setBackground(new Color(204, 204, 204)); panel6.setLayout(new FlowLayout()); //---- SolidMode ---- SolidMode.setText("Solid"); SolidMode.setSelectedIcon(null); SolidMode.setFont(new Font("Tahoma", Font.PLAIN, 20)); SolidMode.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { SolidModeActionPerformed(e); } }); panel6.add(SolidMode); //---- DashedMode ---- DashedMode.setText("Dashed"); DashedMode.setSelectedIcon(null); DashedMode.setFont(new Font("Tahoma", Font.PLAIN, 20)); DashedMode.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { DashedModeActionPerformed(e); } }); panel6.add(DashedMode); //---- showHideLineLen ---- showHideLineLen.setText("Hide line length"); showHideLineLen.setFont(new Font("Tahoma", Font.PLAIN, 20)); showHideLineLen.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { showHideLineLenActionPerformed(e); } }); panel6.add(showHideLineLen); //---- addDoorsbutton ---- addDoorsbutton.setText("Add doors"); addDoorsbutton.setFont(new Font("Tahoma", Font.PLAIN, 20)); addDoorsbutton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { addDoorsbuttonActionPerformed(e); } }); panel6.add(addDoorsbutton); //---- undoButton ---- undoButton.setText("Undo"); undoButton.setFont(new Font("Tahoma", Font.PLAIN, 20)); undoButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { undoDivisionbuttonActionPerformed(e); } }); panel6.add(undoButton); //---- clearButton2 ---- clearButton2.setText("Clear"); clearButton2.setFont(new Font("Tahoma", Font.PLAIN, 20)); clearButton2.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { clearButtonActionPerformed(e); } }); panel6.add(clearButton2); } panel1.add(panel6, cc.xywh(1, 2, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //======== panel7 ======== { panel7.setLayout(new FormLayout("81dlu, $lcgap, 437dlu:grow", "fill:54dlu")); //---- label10 ---- label10.setText("Validation output:"); label10.setFont(new Font("Tahoma", Font.BOLD, 13)); panel7.add(label10, cc.xywh(1, 1, 2, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //======== scrollPane6 ======== { //---- validationMessage ---- validationMessage.setText(""); validationMessage.setBackground(Color.white); validationMessage.setEditable(false); validationMessage.setFont(new Font("Tahoma", Font.BOLD, 14)); scrollPane6.setViewportView(validationMessage); } panel7.add(scrollPane6, cc.xywh(3, 1, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); } panel1.add(panel7, cc.xy(1, 4)); } tabbedPane1.addTab("Layout Editor", panel1); //======== panelFloors ======== { panelFloors.setLayout(new FormLayout("492dlu", "top:361dlu")); //======== scrollPane2 ======== { floorsEditor = new FloorsEditor(layoutEditorsList, this); floorsEditor.initLayout(sizeX); initFloorEditorListener(); scrollPane_floors.setViewportView(floorsEditor); } panelFloors.add(scrollPane_floors, cc.xywh(1, 1, 1, 1, CellConstraints.CENTER, CellConstraints.CENTER)); } tabbedPane1.addTab("Floors View", panelFloors); //======== panel2 ======== { panel2.setLayout(new FormLayout("492dlu", "top:361dlu")); //======== scrollPane2 ======== { //---- hyperGraphEditor ---- hyperGraphEditor.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { hyperGraphEditorMouseClicked(e); } @Override public void mousePressed(MouseEvent e) { hyperGraphEditorMousePressed(e); } @Override public void mouseReleased(MouseEvent e) { hyperGraphEditorMouseReleased(e); } }); hyperGraphEditor.addMouseMotionListener(new MouseMotionAdapter() { @Override public void mouseDragged(MouseEvent e) { hyperGraphEditorMouseDragged(e); } }); scrollPane2.setViewportView(hyperGraphEditor); } panel2.add(scrollPane2, cc.xywh(1, 1, 1, 1, CellConstraints.CENTER, CellConstraints.CENTER)); } tabbedPane1.addTab("Hypergraph View", panel2); //======== panel3 ======== { panel3.addComponentListener(new ComponentAdapter() { @Override public void componentShown(ComponentEvent e) { panel3ComponentShown(e); } }); panel3.setLayout(new FormLayout("default:grow", "fill:default:grow")); //======== validationEditor ======== { validationEditor.setLayout( new FormLayout("right:47dlu, $lcgap, 120dlu, $lcgap, center:17dlu, $ugap, 288dlu", "default, $lgap, 227dlu, 2*($lgap, default)")); //---- label7 ---- label7.setText("Enabled tests"); validationEditor.add(label7, cc.xy(1, 1)); //---- label6 ---- label6.setText("Choose file to edit"); validationEditor.add(label6, cc.xywh(3, 1, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //======== scrollPane5 ======== { //---- fileChooseingList ---- fileChooseingList.setVisibleRowCount(20); fileChooseingList.addListSelectionListener(new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent e) { fileChooseingListValueChanged(e); } }); scrollPane5.setViewportView(fileChooseingList); } validationEditor.add(scrollPane5, cc.xy(1, 3)); //======== scrollPane3 ======== { //---- filesList ---- filesList.setVisibleRowCount(20); filesList.addListSelectionListener(new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent e) { filesListValueChanged(e); } }); scrollPane3.setViewportView(filesList); } validationEditor.add(scrollPane3, cc.xy(3, 3)); //======== scrollPane4 ======== { //======== panel10 ======== { panel10.setLayout(new FormLayout("default:grow", "default, $pgap, fill:default:grow")); //---- fileNameLabel ---- fileNameLabel.setText("---"); panel10.add(fileNameLabel, cc.xywh(1, 1, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- fileContent ---- fileContent.setRows(20); fileContent.setFont(new Font("Arial", Font.PLAIN, 13)); panel10.add(fileContent, cc.xy(1, 3)); } scrollPane4.setViewportView(panel10); } validationEditor.add(scrollPane4, cc.xy(7, 3)); //---- saveFileButton ---- saveFileButton.setText("Save file"); saveFileButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { saveFileButtonActionPerformed(e); } }); validationEditor.add(saveFileButton, cc.xywh(7, 5, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); } panel3.add(validationEditor, cc.xy(1, 1)); } tabbedPane1.addTab("Project Validation", panel3); } contentPane.add(tabbedPane1, cc.xywh(2, 3, 2, 1, CellConstraints.FILL, CellConstraints.FILL)); tabbedPane1.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { tabbedPaneTabChanged(e); } }); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:edu.byu.plugins.editors.ArchDescPhysicalDescFields.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license repositoryInfo = new JPanel(); panel21 = new JPanel(); label_resourcesExtentNumber = new JLabel(); resourcesExtentNumber = ATBasicComponentFactory.createDoubleField(detailsModel, ArchDescriptionPhysicalDescriptions.PROPERTYNAME_EXTENT_NUMBER); extentType2 = ATBasicComponentFactory.createComboBox(detailsModel, ArchDescriptionPhysicalDescriptions.PROPERTYNAME_EXTENT_TYPE, ArchDescriptionPhysicalDescriptions.class); label_resourcesExtentDescription = new JLabel(); scrollPane422 = new JScrollPane(); containerSummary = ATBasicComponentFactory.createTextArea( detailsModel.getModel(ArchDescriptionPhysicalDescriptions.PROPERTYNAME_CONTAINER_SUMMARY), false); label_resourcesExtentDescription2 = new JLabel(); scrollPane423 = new JScrollPane(); containerSummary2 = ATBasicComponentFactory.createTextArea( detailsModel.getModel(ArchDescriptionPhysicalDescriptions.PROPERTYNAME_PHYSICAL_DETAILS), false); label_resourcesExtentDescription3 = new JLabel(); scrollPane424 = new JScrollPane(); containerSummary3 = ATBasicComponentFactory.createTextArea( detailsModel.getModel(ArchDescriptionPhysicalDescriptions.PROPERTYNAME_DIMENSIONS), false); CellConstraints cc = new CellConstraints(); //======== this ======== setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); setBackground(new Color(200, 205, 232)); setLayout(new FormLayout("default:grow", "top:default:grow")); //======== repositoryInfo ======== {// w ww. j a va 2 s . co m repositoryInfo.setBorder(Borders.DLU4_BORDER); repositoryInfo.setOpaque(false); repositoryInfo.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); repositoryInfo.setBackground(new Color(200, 205, 232)); repositoryInfo.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("max(default;400px):grow") }, new 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 })); //======== panel21 ======== { panel21.setOpaque(false); panel21.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- label_resourcesExtentNumber ---- label_resourcesExtentNumber.setText("Extent"); label_resourcesExtentNumber.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesExtentNumber, ArchDescriptionPhysicalDescriptions.class, ArchDescriptionPhysicalDescriptions.PROPERTYNAME_EXTENT_NUMBER); panel21.add(label_resourcesExtentNumber, cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- resourcesExtentNumber ---- resourcesExtentNumber.setColumns(4); resourcesExtentNumber.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel21.add(resourcesExtentNumber, cc.xywh(3, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- extentType2 ---- extentType2.setOpaque(false); extentType2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel21.add(extentType2, new CellConstraints(5, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT, new Insets(0, 5, 5, 5))); } repositoryInfo.add(panel21, cc.xywh(1, 1, 3, 1)); //---- label_resourcesExtentDescription ---- label_resourcesExtentDescription.setText("Container Summary"); label_resourcesExtentDescription.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesExtentDescription, ArchDescriptionPhysicalDescriptions.class, ArchDescriptionPhysicalDescriptions.PROPERTYNAME_CONTAINER_SUMMARY); repositoryInfo.add(label_resourcesExtentDescription, cc.xywh(1, 3, 3, 1)); //======== scrollPane422 ======== { scrollPane422.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane422.setOpaque(false); scrollPane422.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- containerSummary ---- containerSummary.setRows(4); containerSummary.setWrapStyleWord(true); containerSummary.setLineWrap(true); containerSummary.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane422.setViewportView(containerSummary); } repositoryInfo.add(scrollPane422, cc.xywh(1, 5, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- label_resourcesExtentDescription2 ---- label_resourcesExtentDescription2.setText("Other Physical Details"); label_resourcesExtentDescription2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesExtentDescription2, ArchDescriptionPhysicalDescriptions.class, ArchDescriptionPhysicalDescriptions.PROPERTYNAME_PHYSICAL_DETAILS); repositoryInfo.add(label_resourcesExtentDescription2, cc.xywh(1, 7, 3, 1)); //======== scrollPane423 ======== { scrollPane423.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane423.setOpaque(false); scrollPane423.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- containerSummary2 ---- containerSummary2.setRows(4); containerSummary2.setWrapStyleWord(true); containerSummary2.setLineWrap(true); containerSummary2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane423.setViewportView(containerSummary2); } repositoryInfo.add(scrollPane423, cc.xywh(1, 9, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- label_resourcesExtentDescription3 ---- label_resourcesExtentDescription3.setText("Container Summary"); label_resourcesExtentDescription3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesExtentDescription3, ArchDescriptionPhysicalDescriptions.class, ArchDescriptionPhysicalDescriptions.PROPERTYNAME_DIMENSIONS); repositoryInfo.add(label_resourcesExtentDescription3, cc.xywh(1, 11, 3, 1)); //======== scrollPane424 ======== { scrollPane424.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane424.setOpaque(false); scrollPane424.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- containerSummary3 ---- containerSummary3.setRows(4); containerSummary3.setWrapStyleWord(true); containerSummary3.setLineWrap(true); containerSummary3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane424.setViewportView(containerSummary3); } repositoryInfo.add(scrollPane424, cc.xywh(1, 13, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); } add(repositoryInfo, cc.xy(1, 1)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:edu.byu.plugins.editors.ArchDescriptionDatesFields.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license repositoryInfo = new JPanel(); label15 = new JLabel(); dateExpression = ATBasicComponentFactory .createTextField(detailsModel.getModel(ArchDescriptionDates.PROPERTYNAME_DATE_EXPRESSION)); Date1Label = new JLabel(); panel1 = new JPanel(); label_date1Begin = new JLabel(); date1Begin = BYU_ATBasicComponentFactory .createISODateField(detailsModel.getModel(ArchDescriptionDates.PROPERTYNAME_ISODATE_BEGIN)); label_date1End = new JLabel(); date1End = BYU_ATBasicComponentFactory .createISODateField(detailsModel.getModel(ArchDescriptionDates.PROPERTYNAME_ISODATE_END)); BulkDatesLabel = new JLabel(); panel2 = new JPanel(); label_bulkDateBegin = new JLabel(); bulkDateBegin = BYU_ATBasicComponentFactory .createISODateField(detailsModel.getModel(ArchDescriptionDates.PROPERTYNAME_ISOBULK_DATE_BEGIN)); label_bulkDateEnd = new JLabel(); bulkDateEnd = BYU_ATBasicComponentFactory .createISODateField(detailsModel.getModel(ArchDescriptionDates.PROPERTYNAME_ISOBULK_DATE_END)); rights = ATBasicComponentFactory.createCheckBox(detailsModel, ArchDescriptionDates.PROPERTYNAME_CERTAINTY, ArchDescriptionDates.class); label3 = new JLabel(); extentType = ATBasicComponentFactory.createComboBox(detailsModel, ArchDescriptionDates.PROPERTYNAME_DATE_TYPE, ArchDescriptionDates.class); label4 = new JLabel(); extentType2 = ATBasicComponentFactory.createComboBox(detailsModel, ArchDescriptionDates.PROPERTYNAME_ERA, ArchDescriptionDates.class); label5 = new JLabel(); extentType3 = ATBasicComponentFactory.createComboBox(detailsModel, ArchDescriptionDates.PROPERTYNAME_CALENDAR, ArchDescriptionDates.class); CellConstraints cc = new CellConstraints(); //======== this ======== setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); setBackground(new Color(200, 205, 232)); setLayout(new FormLayout("default:grow", "top:default:grow")); //======== repositoryInfo ======== {// w w w.jav a 2 s . c o m repositoryInfo.setBorder(Borders.DLU4_BORDER); repositoryInfo.setOpaque(false); repositoryInfo.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); repositoryInfo.setBackground(new Color(200, 205, 232)); repositoryInfo.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("max(default;400px):grow") }, new 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, FormFactory.DEFAULT_ROWSPEC })); //---- label15 ---- label15.setText("Date Expression"); label15.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label15, ArchDescriptionDates.class, ArchDescriptionDates.PROPERTYNAME_DATE_EXPRESSION); repositoryInfo.add(label15, cc.xy(1, 1)); //---- dateExpression ---- dateExpression.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); dateExpression.setColumns(12); repositoryInfo.add(dateExpression, cc.xywh(3, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- Date1Label ---- Date1Label.setText("Inclusive Dates"); Date1Label.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); repositoryInfo.add(Date1Label, cc.xywh(1, 3, 3, 1)); //======== panel1 ======== { panel1.setBackground(new Color(200, 205, 232)); panel1.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); //---- label_date1Begin ---- label_date1Begin.setText("Begin"); label_date1Begin.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_date1Begin, ArchDescriptionDates.class, ArchDescriptionDates.PROPERTYNAME_ISODATE_BEGIN); panel1.add(label_date1Begin, cc.xy(3, 1)); //---- date1Begin ---- date1Begin.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel1.add(date1Begin, cc.xywh(5, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- label_date1End ---- label_date1End.setText("End"); label_date1End.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_date1End, ArchDescriptionDates.class, ArchDescriptionDates.PROPERTYNAME_ISODATE_END); panel1.add(label_date1End, cc.xy(7, 1)); //---- date1End ---- date1End.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel1.add(date1End, new CellConstraints(9, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT, new Insets(0, 0, 0, 5))); } repositoryInfo.add(panel1, cc.xywh(1, 5, 3, 1)); //---- BulkDatesLabel ---- BulkDatesLabel.setText("Bulk Dates"); BulkDatesLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); repositoryInfo.add(BulkDatesLabel, cc.xywh(1, 7, 3, 1)); //======== panel2 ======== { panel2.setBackground(new Color(200, 205, 232)); panel2.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); //---- label_bulkDateBegin ---- label_bulkDateBegin.setText("Begin"); label_bulkDateBegin.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_bulkDateBegin, ArchDescriptionDates.class, ArchDescriptionDates.PROPERTYNAME_ISOBULK_DATE_BEGIN); panel2.add(label_bulkDateBegin, cc.xy(3, 1)); //---- bulkDateBegin ---- bulkDateBegin.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel2.add(bulkDateBegin, cc.xywh(5, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- label_bulkDateEnd ---- label_bulkDateEnd.setText("End"); label_bulkDateEnd.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_bulkDateEnd, ArchDescriptionDates.class, ArchDescriptionDates.PROPERTYNAME_ISOBULK_DATE_END); panel2.add(label_bulkDateEnd, cc.xy(7, 1)); //---- bulkDateEnd ---- bulkDateEnd.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel2.add(bulkDateEnd, new CellConstraints(9, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT, new Insets(0, 0, 0, 5))); } repositoryInfo.add(panel2, cc.xywh(1, 9, 3, 1)); //---- rights ---- rights.setBackground(new Color(231, 188, 251)); rights.setText("Notification"); rights.setOpaque(false); rights.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); rights.setText( ATFieldInfo.getLabel(ArchDescriptionDates.class, ArchDescriptionDates.PROPERTYNAME_CERTAINTY)); repositoryInfo.add(rights, cc.xywh(1, 11, 3, 1)); //---- label3 ---- label3.setText("Date Type"); ATFieldInfo.assignLabelInfo(label3, ArchDescriptionDates.class, ArchDescriptionDates.PROPERTYNAME_DATE_TYPE); repositoryInfo.add(label3, cc.xy(1, 13)); //---- extentType ---- extentType.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); extentType.setOpaque(false); repositoryInfo.add(extentType, new CellConstraints(3, 13, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT, new Insets(0, 5, 5, 5))); //---- label4 ---- label4.setText("Erazzz"); ATFieldInfo.assignLabelInfo(label4, ArchDescriptionDates.class, ArchDescriptionDates.PROPERTYNAME_ERA); repositoryInfo.add(label4, cc.xy(1, 15)); //---- extentType2 ---- extentType2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); extentType2.setOpaque(false); repositoryInfo.add(extentType2, new CellConstraints(3, 15, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT, new Insets(0, 5, 5, 5))); //---- label5 ---- label5.setText("Calendar"); ATFieldInfo.assignLabelInfo(label5, ArchDescriptionDates.class, ArchDescriptionDates.PROPERTYNAME_CALENDAR); repositoryInfo.add(label5, cc.xy(1, 17)); //---- extentType3 ---- extentType3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); extentType3.setOpaque(false); repositoryInfo.add(extentType3, new CellConstraints(3, 17, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT, new Insets(0, 5, 5, 5))); } add(repositoryInfo, cc.xy(1, 1)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:edu.byu.plugins.editors.panels.AccessionsBasicInfoPanel.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license panel11 = new JPanel(); panel12 = new JPanel(); label_accessionNumber1 = new JLabel(); accessionNumber1 = ATBasicComponentFactory .createTextField(detailsModel.getModel(Accessions.PROPERTYNAME_ACCESSION_NUMBER_1)); accessionNumber2 = ATBasicComponentFactory .createTextField(detailsModel.getModel(Accessions.PROPERTYNAME_ACCESSION_NUMBER_2)); accessionNumber3 = ATBasicComponentFactory .createTextField(detailsModel.getModel(Accessions.PROPERTYNAME_ACCESSION_NUMBER_3)); accessionNumber4 = ATBasicComponentFactory .createTextField(detailsModel.getModel(Accessions.PROPERTYNAME_ACCESSION_NUMBER_4)); panel34 = new JPanel(); label_accessionDate = new JLabel(); accessionDate = ATBasicComponentFactory .createDateField(detailsModel.getModel(Accessions.PROPERTYNAME_ACCESSION_DATE)); panel2 = new JPanel(); panel15 = new JPanel(); OtherAccessionsLabel = new JLabel(); scrollPane4 = new JScrollPane(); tableAccessionsResources = new DomainSortableTable(); panel19 = new JPanel(); linkResource = new JButton(); removeResourceLink = new JButton(); panel27 = new JPanel(); label_resourceType = new JLabel(); resourceType = ATBasicComponentFactory.createComboBox(detailsModel, Accessions.PROPERTYNAME_RESOURCE_TYPE, Accessions.class, 10); label_title = new JLabel(); scrollPane42 = new JScrollPane(); title = ATBasicComponentFactory.createTextArea(detailsModel.getModel(ArchDescription.PROPERTYNAME_TITLE)); label_repositoryName5 = new JLabel(); scrollPane9 = new JScrollPane(); physicalDescriptionsTable = new DomainSortableTable(ArchDescriptionPhysicalDescriptions.class); panel23 = new JPanel(); addPhysicalDescription = new JButton(); removePhysicalDescription = new JButton(); panel14 = new JPanel(); label_repositoryName = new JLabel(); repositoryName = new JTextField(); changeRepositoryButton = new JButton(); panel13 = new JPanel(); label_repositoryName4 = new JLabel(); scrollPane8 = new JScrollPane(); dateTable = new DomainSortableTable(ArchDescriptionDates.class); panel22 = new JPanel(); addDate = new JButton(); removeDate = new JButton(); label_repositoryName3 = new JLabel(); scrollPane6 = new JScrollPane(); deaccessionsTable = new DomainSortableTable(Deaccessions.class); panel18 = new JPanel(); addDeaccessions = new JButton(); removeDeaccession = new JButton(); label_repositoryName2 = new JLabel(); scrollPane7 = new JScrollPane(); locationsTable = new DomainSortableTable(AccessionsLocations.class); panel26 = new JPanel(); addButton = new JButton(); removeLocationButton = new JButton(); label_title2 = new JLabel(); scrollPane43 = new JScrollPane(); title2 = ATBasicComponentFactory//ww w . j a v a2 s . com .createTextArea(detailsModel.getModel(Accessions.PROPERTYNAME_GENERAL_ACCESSION_NOTE)); CellConstraints cc = new CellConstraints(); //======== this ======== setMinimumSize(new Dimension(640, 380)); setBackground(new Color(200, 205, 232)); setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("fill:default:grow"))); ((FormLayout) getLayout()).setColumnGroups(new int[][] { { 1, 3 } }); //======== panel11 ======== { panel11.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel11.setBackground(new Color(200, 205, 232)); panel11.setMinimumSize(new Dimension(200, 206)); panel11.setPreferredSize(new Dimension(200, 278)); panel11.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), 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 })); //======== panel12 ======== { panel12.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel12.setBackground(new Color(200, 205, 232)); panel12.setMinimumSize(new Dimension(200, 22)); panel12.setPreferredSize(new Dimension(200, 22)); panel12.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("50px:grow"), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("50px:grow"), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("50px:grow"), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("50px:grow") }, RowSpec.decodeSpecs("default"))); ((FormLayout) panel12.getLayout()).setColumnGroups(new int[][] { { 3, 5, 7, 9 } }); //---- label_accessionNumber1 ---- label_accessionNumber1.setText("Accession No."); label_accessionNumber1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_accessionNumber1, Accessions.class, Accessions.PROPERTYNAME_ACCESSION_NUMBER); panel12.add(label_accessionNumber1, cc.xywh(1, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- accessionNumber1 ---- accessionNumber1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel12.add(accessionNumber1, cc.xywh(3, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- accessionNumber2 ---- accessionNumber2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel12.add(accessionNumber2, cc.xy(5, 1)); //---- accessionNumber3 ---- accessionNumber3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel12.add(accessionNumber3, cc.xy(7, 1)); //---- accessionNumber4 ---- accessionNumber4.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel12.add(accessionNumber4, cc.xy(9, 1)); } panel11.add(panel12, cc.xy(1, 1)); //======== panel34 ======== { panel34.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel34.setBackground(new Color(200, 205, 232)); panel34.setPreferredSize(new Dimension(200, 22)); panel34.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.LEFT, Sizes.PREFERRED, FormSpec.NO_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); //---- label_accessionDate ---- label_accessionDate.setText("Accession Date"); label_accessionDate.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_accessionDate, Accessions.class, Accessions.PROPERTYNAME_ACCESSION_DATE); panel34.add(label_accessionDate, cc.xy(1, 1)); //---- accessionDate ---- accessionDate.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); accessionDate.setColumns(10); panel34.add(accessionDate, cc.xywh(3, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); } panel11.add(panel34, cc.xywh(1, 3, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //======== panel2 ======== { panel2.setBorder(new BevelBorder(BevelBorder.LOWERED)); panel2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel2.setBackground(new Color(182, 187, 212)); panel2.setMinimumSize(new Dimension(200, 92)); panel2.setPreferredSize(new Dimension(200, 119)); panel2.setLayout(new FormLayout("default:grow", "fill:default:grow")); //======== panel15 ======== { panel15.setOpaque(false); panel15.setBorder(Borders.DLU2_BORDER); panel15.setMinimumSize(new Dimension(200, 88)); panel15.setPreferredSize(new Dimension(200, 115)); panel15.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- OtherAccessionsLabel ---- OtherAccessionsLabel.setText("Resources Linked to this accession"); OtherAccessionsLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel15.add(OtherAccessionsLabel, cc.xy(1, 1)); //======== scrollPane4 ======== { scrollPane4.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane4.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane4.setPreferredSize(new Dimension(200, 54)); //---- tableAccessionsResources ---- tableAccessionsResources.setPreferredScrollableViewportSize(new Dimension(450, 50)); tableAccessionsResources.setFocusable(false); tableAccessionsResources.setSelectionBackground(Color.magenta); scrollPane4.setViewportView(tableAccessionsResources); } panel15.add(scrollPane4, cc.xy(1, 3)); //======== panel19 ======== { panel19.setOpaque(false); panel19.setMinimumSize(new Dimension(100, 29)); panel19.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- linkResource ---- linkResource.setText("Link Resource"); linkResource.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); linkResource.setOpaque(false); linkResource.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { linkResourceActionPerformed(e); } }); panel19.add(linkResource, cc.xy(1, 1)); //---- removeResourceLink ---- removeResourceLink.setText("Remove Link"); removeResourceLink.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); removeResourceLink.setOpaque(false); removeResourceLink.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { removeResourceLinkActionPerformed(e); } }); panel19.add(removeResourceLink, cc.xy(3, 1)); } panel15.add(panel19, cc.xywh(1, 5, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); } panel2.add(panel15, cc.xy(1, 1)); } panel11.add(panel2, cc.xy(1, 5)); //======== panel27 ======== { panel27.setOpaque(false); panel27.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); //---- label_resourceType ---- label_resourceType.setText("Resource Type"); label_resourceType.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourceType, Accessions.class, Accessions.PROPERTYNAME_RESOURCE_TYPE); panel27.add(label_resourceType, cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- resourceType ---- resourceType.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); resourceType.setOpaque(false); panel27.add(resourceType, cc.xywh(3, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); } panel11.add(panel27, cc.xy(1, 7)); //---- label_title ---- label_title.setText("Title"); label_title.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_title, Accessions.class, Accessions.PROPERTYNAME_TITLE); panel11.add(label_title, cc.xy(1, 9)); //======== scrollPane42 ======== { scrollPane42.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane42.setPreferredSize(new Dimension(200, 68)); scrollPane42.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); //---- title ---- title.setRows(4); title.setLineWrap(true); title.setWrapStyleWord(true); title.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane42.setViewportView(title); } panel11.add(scrollPane42, cc.xy(1, 11)); //---- label_repositoryName5 ---- label_repositoryName5.setText("Physical Description"); label_repositoryName5.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel11.add(label_repositoryName5, cc.xy(1, 13)); //======== scrollPane9 ======== { scrollPane9.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane9.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane9.setPreferredSize(new Dimension(200, 104)); //---- physicalDescriptionsTable ---- physicalDescriptionsTable.setPreferredScrollableViewportSize(new Dimension(200, 100)); physicalDescriptionsTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { physicalDescriptionMouseClicked(e); } }); scrollPane9.setViewportView(physicalDescriptionsTable); } panel11.add(scrollPane9, cc.xywh(1, 15, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //======== panel23 ======== { panel23.setBackground(new Color(231, 188, 251)); panel23.setOpaque(false); panel23.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel23.setMinimumSize(new Dimension(100, 29)); panel23.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- addPhysicalDescription ---- addPhysicalDescription.setText("Add Description"); addPhysicalDescription.setOpaque(false); addPhysicalDescription.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); addPhysicalDescription.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addPhysicalDescriptionActionPerformed(); } }); panel23.add(addPhysicalDescription, cc.xy(1, 1)); //---- removePhysicalDescription ---- removePhysicalDescription.setText("Remove Description"); removePhysicalDescription.setOpaque(false); removePhysicalDescription.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); removePhysicalDescription.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { removePhysicalDescriptionActionPerformed(); } }); panel23.add(removePhysicalDescription, cc.xy(3, 1)); } panel11.add(panel23, cc.xywh(1, 17, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //======== panel14 ======== { panel14.setOpaque(false); panel14.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.LEFT, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- label_repositoryName ---- label_repositoryName.setText("Repository"); label_repositoryName.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_repositoryName, Accessions.class, Accessions.PROPERTYNAME_REPOSITORY); panel14.add(label_repositoryName, cc.xy(1, 1)); //---- repositoryName ---- repositoryName.setEditable(false); repositoryName.setFocusable(false); repositoryName.setBorder(null); repositoryName.setOpaque(false); repositoryName.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); repositoryName.setHorizontalAlignment(SwingConstants.LEFT); panel14.add(repositoryName, cc.xywh(3, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- changeRepositoryButton ---- changeRepositoryButton.setText("Change Repository"); changeRepositoryButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); changeRepositoryButton.setOpaque(false); changeRepositoryButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { changeRepositoryButtonActionPerformed(); } }); panel14.add(changeRepositoryButton, cc.xy(5, 1)); } panel11.add(panel14, cc.xy(1, 19)); } add(panel11, cc.xy(1, 1)); //======== panel13 ======== { panel13.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel13.setBackground(new Color(200, 205, 232)); panel13.setPreferredSize(new Dimension(200, 317)); panel13.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new 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(RowSpec.FILL, Sizes.DEFAULT, 0.4), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, 0.4), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, 0.19999999999999998) })); ((FormLayout) panel13.getLayout()).setRowGroups(new int[][] { { 9, 15, 21 } }); //---- label_repositoryName4 ---- label_repositoryName4.setText("Dates"); label_repositoryName4.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel13.add(label_repositoryName4, cc.xy(1, 1)); //======== scrollPane8 ======== { scrollPane8.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane8.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane8.setPreferredSize(new Dimension(200, 104)); //---- dateTable ---- dateTable.setPreferredScrollableViewportSize(new Dimension(200, 100)); dateTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { dateTableMouseClicked(e); } }); scrollPane8.setViewportView(dateTable); } panel13.add(scrollPane8, cc.xywh(1, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //======== panel22 ======== { panel22.setBackground(new Color(231, 188, 251)); panel22.setOpaque(false); panel22.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel22.setMinimumSize(new Dimension(100, 29)); panel22.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- addDate ---- addDate.setText("Add Date"); addDate.setOpaque(false); addDate.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); addDate.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addDateActionPerformed(e); } }); panel22.add(addDate, cc.xy(1, 1)); //---- removeDate ---- removeDate.setText("Remove Date"); removeDate.setOpaque(false); removeDate.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); removeDate.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { removeDateActionPerformed(e); } }); panel22.add(removeDate, cc.xy(3, 1)); } panel13.add(panel22, cc.xywh(1, 5, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- label_repositoryName3 ---- label_repositoryName3.setText("Deaccessions"); label_repositoryName3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel13.add(label_repositoryName3, cc.xy(1, 7)); //======== scrollPane6 ======== { scrollPane6.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane6.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane6.setPreferredSize(new Dimension(200, 104)); //---- deaccessionsTable ---- deaccessionsTable.setPreferredScrollableViewportSize(new Dimension(200, 100)); deaccessionsTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { deaccessionsTableMouseClicked(e); } }); scrollPane6.setViewportView(deaccessionsTable); } panel13.add(scrollPane6, cc.xywh(1, 9, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //======== panel18 ======== { panel18.setBackground(new Color(231, 188, 251)); panel18.setOpaque(false); panel18.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel18.setMinimumSize(new Dimension(100, 29)); panel18.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- addDeaccessions ---- addDeaccessions.setText("Add Deaccession"); addDeaccessions.setOpaque(false); addDeaccessions.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); addDeaccessions.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addDeaccessionsActionPerformed(); } }); panel18.add(addDeaccessions, cc.xy(1, 1)); //---- removeDeaccession ---- removeDeaccession.setText("Remove Deaccession"); removeDeaccession.setOpaque(false); removeDeaccession.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); removeDeaccession.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { removeDeaccessionActionPerformed(); } }); panel18.add(removeDeaccession, cc.xy(3, 1)); } panel13.add(panel18, cc.xywh(1, 11, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- label_repositoryName2 ---- label_repositoryName2.setText("Locations"); label_repositoryName2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_repositoryName2, Accessions.class, Accessions.PROPERTYNAME_LOCATIONS); panel13.add(label_repositoryName2, cc.xy(1, 13)); //======== scrollPane7 ======== { scrollPane7.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane7.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane7.setPreferredSize(new Dimension(200, 64)); //---- locationsTable ---- locationsTable.setPreferredScrollableViewportSize(new Dimension(200, 60)); locationsTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { locationsTableMouseClicked(e); } }); scrollPane7.setViewportView(locationsTable); } panel13.add(scrollPane7, cc.xywh(1, 15, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //======== panel26 ======== { panel26.setOpaque(false); panel26.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- addButton ---- addButton.setText("Add Location"); addButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); addButton.setOpaque(false); addButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addLocationButtonActionPerformed(e); } }); panel26.add(addButton, cc.xy(1, 1)); //---- removeLocationButton ---- removeLocationButton.setText("Remove Location"); removeLocationButton.setOpaque(false); removeLocationButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); removeLocationButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { removeLocationButtonActionPerformed(e); } }); panel26.add(removeLocationButton, cc.xy(3, 1)); } panel13.add(panel26, cc.xywh(1, 17, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- label_title2 ---- label_title2.setText("General accession note"); label_title2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_title2, Accessions.class, Accessions.PROPERTYNAME_GENERAL_ACCESSION_NOTE); panel13.add(label_title2, cc.xy(1, 19)); //======== scrollPane43 ======== { scrollPane43.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane43.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane43.setPreferredSize(new Dimension(200, 68)); //---- title2 ---- title2.setRows(4); title2.setLineWrap(true); title2.setWrapStyleWord(true); title2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane43.setViewportView(title2); } panel13.add(scrollPane43, cc.xy(1, 21)); } add(panel13, cc.xywh(3, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:edu.byu.plugins.editors.panels.DigitalObjectBasicInfoPanel.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license panel16 = new JPanel(); panel1 = new JPanel(); label_resourcesLanguageCode4 = new JLabel(); label = ATBasicComponentFactory.createTextField(detailsModel.getModel(DigitalObjects.PROPERTYNAME_LABEL), false);//from w w w.j a v a 2 s . co m panel19 = new JPanel(); label_resourcesTitle = new JLabel(); scrollPane42 = new JScrollPane(); title = ATBasicComponentFactory.createTextArea(detailsModel.getModel(ArchDescription.PROPERTYNAME_TITLE), false); resourcesPanel = new JPanel(); resourcesLabel = new JLabel(); scrollPane4 = new JScrollPane(); resourcesTable = new DomainSortableTable(); panel13 = new JPanel(); panel17 = new JPanel(); label_repositoryName4 = new JLabel(); scrollPane8 = new JScrollPane(); dateTable = new DomainSortableTable(ArchDescriptionDates.class); panel22 = new JPanel(); addDate = new JButton(); removeDate = new JButton(); digitalObjectResourceRecordOnly = new JPanel(); restrictionsApply = ATBasicComponentFactory.createCheckBox(detailsModel, ArchDescription.PROPERTYNAME_RESTRICTIONS_APPLY, DigitalObjects.class); label_resourcesLanguageCode3 = new JLabel(); objectType = ATBasicComponentFactory.createComboBox(detailsModel, DigitalObjects.PROPERTYNAME_OBJECT_TYPE, DigitalObjects.class); actuateLabel2 = new JLabel(); scrollPane43 = new JScrollPane(); title2 = ATBasicComponentFactory .createTextArea(detailsModel.getModel(DigitalObjects.PROPERTYNAME_METS_IDENTIFIER), false); actuateLabel = new JLabel(); actuate = ATBasicComponentFactory.createComboBox(detailsModel, DigitalObjects.PROPERTYNAME_EAD_DAO_ACTUATE, DigitalObjects.class); showLabel = new JLabel(); show = ATBasicComponentFactory.createComboBox(detailsModel, DigitalObjects.PROPERTYNAME_EAD_DAO_SHOW, DigitalObjects.class); componentIDPanel = new JPanel(); componentLabel1 = new JLabel(); dateExpression2 = ATBasicComponentFactory .createTextField(detailsModel.getModel(DigitalObjects.PROPERTYNAME_COMPONENT_ID), false); panel5 = new JPanel(); label_resourcesLanguageCode = new JLabel(); languageCode = ATBasicComponentFactory.createComboBox(detailsModel, DigitalObjects.PROPERTYNAME_LANGUAGE_CODE, DigitalObjects.class); repositoryPanel = new JPanel(); label_repositoryName = new JLabel(); repositoryName = new JTextField(); changeRepositoryButton = new JButton(); panel2 = new JPanel(); label1 = new JLabel(); scrollPane6 = new JScrollPane(); fileVersionsTable = new DomainSortableTable(FileVersions.class, FileVersions.PROPERTYNAME_FILE_VERSIONS_USE_STATEMENT); panel29 = new JPanel(); addFileVersionButton = new JButton(); removeFileVersionButton = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setBackground(new Color(200, 205, 232)); setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); ((FormLayout) getLayout()).setColumnGroups(new int[][] { { 1, 3 } }); //======== panel16 ======== { panel16.setOpaque(false); panel16.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel16.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, 0.30000000000000004) })); //======== panel1 ======== { panel1.setOpaque(false); panel1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel1.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); //---- label_resourcesLanguageCode4 ---- label_resourcesLanguageCode4.setText("Label"); label_resourcesLanguageCode4.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesLanguageCode4, DigitalObjects.class, DigitalObjects.PROPERTYNAME_LABEL); panel1.add(label_resourcesLanguageCode4, cc.xy(1, 1)); //---- label ---- label.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel1.add(label, new CellConstraints(3, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.TOP, new Insets(0, 0, 0, 5))); } panel16.add(panel1, cc.xy(1, 1)); //======== panel19 ======== { panel19.setOpaque(false); panel19.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel19.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- label_resourcesTitle ---- label_resourcesTitle.setText("Title"); label_resourcesTitle.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesTitle, DigitalObjects.class, DigitalObjects.PROPERTYNAME_TITLE); panel19.add(label_resourcesTitle, cc.xy(1, 1)); //======== scrollPane42 ======== { scrollPane42.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane42.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- title ---- title.setRows(4); title.setLineWrap(true); title.setWrapStyleWord(true); title.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane42.setViewportView(title); } panel19.add(scrollPane42, cc.xywh(1, 3, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //======== resourcesPanel ======== { resourcesPanel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); resourcesPanel.setOpaque(false); resourcesPanel.setBorder(new BevelBorder(BevelBorder.LOWERED)); resourcesPanel.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) })); //---- resourcesLabel ---- resourcesLabel.setText("Resource Linked to this Digital Object"); resourcesLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); resourcesPanel.add(resourcesLabel, cc.xy(1, 1)); //======== scrollPane4 ======== { scrollPane4.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane4.setPreferredSize(new Dimension(300, 50)); scrollPane4.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- resourcesTable ---- resourcesTable.setPreferredScrollableViewportSize(new Dimension(300, 100)); resourcesTable.setFocusable(false); scrollPane4.setViewportView(resourcesTable); } resourcesPanel.add(scrollPane4, cc.xywh(1, 3, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); } panel19.add(resourcesPanel, cc.xywh(1, 5, 3, 1)); } panel16.add(panel19, cc.xy(1, 3)); } add(panel16, cc.xy(1, 1)); //======== panel13 ======== { panel13.setOpaque(false); panel13.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel13.setLayout(new FormLayout("left:default:grow", "fill:default:grow")); //======== panel17 ======== { panel17.setOpaque(false); panel17.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel17.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.TOP, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.TOP, Sizes.DEFAULT, FormSpec.NO_GROW) })); //---- label_repositoryName4 ---- label_repositoryName4.setText("Dates"); label_repositoryName4.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel17.add(label_repositoryName4, cc.xy(1, 1)); //======== scrollPane8 ======== { scrollPane8.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane8.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane8.setPreferredSize(new Dimension(200, 104)); //---- dateTable ---- dateTable.setPreferredScrollableViewportSize(new Dimension(200, 100)); dateTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { dateTableMouseClicked(e); } }); scrollPane8.setViewportView(dateTable); } panel17.add(scrollPane8, cc.xy(1, 3)); //======== panel22 ======== { panel22.setBackground(new Color(231, 188, 251)); panel22.setOpaque(false); panel22.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel22.setMinimumSize(new Dimension(100, 29)); panel22.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- addDate ---- addDate.setText("Add Date"); addDate.setOpaque(false); addDate.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); addDate.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addDateActionPerformed(e); } }); panel22.add(addDate, cc.xy(1, 1)); //---- removeDate ---- removeDate.setText("Remove Date"); removeDate.setOpaque(false); removeDate.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); removeDate.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { removeDateActionPerformed(e); } }); panel22.add(removeDate, cc.xy(3, 1)); } panel17.add(panel22, cc.xywh(1, 5, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //======== digitalObjectResourceRecordOnly ======== { digitalObjectResourceRecordOnly.setOpaque(false); digitalObjectResourceRecordOnly.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.TOP, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- restrictionsApply ---- restrictionsApply.setBackground(new Color(231, 188, 251)); restrictionsApply.setText("Restrictions Apply"); restrictionsApply.setOpaque(false); restrictionsApply.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); restrictionsApply.setText(ATFieldInfo.getLabel(DigitalObjects.class, ArchDescription.PROPERTYNAME_RESTRICTIONS_APPLY)); digitalObjectResourceRecordOnly.add(restrictionsApply, cc.xywh(1, 1, 3, 1)); //---- label_resourcesLanguageCode3 ---- label_resourcesLanguageCode3.setText("Object Type"); label_resourcesLanguageCode3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesLanguageCode3, DigitalObjects.class, DigitalObjects.PROPERTYNAME_OBJECT_TYPE); digitalObjectResourceRecordOnly.add(label_resourcesLanguageCode3, cc.xy(1, 3)); //---- objectType ---- objectType.setMaximumSize(new Dimension(50, 27)); objectType.setOpaque(false); objectType.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); digitalObjectResourceRecordOnly.add(objectType, cc.xywh(3, 3, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- actuateLabel2 ---- actuateLabel2.setText("Digital Object ID"); actuateLabel2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(actuateLabel2, DigitalObjects.class, DigitalObjects.PROPERTYNAME_METS_IDENTIFIER); digitalObjectResourceRecordOnly.add(actuateLabel2, cc.xy(1, 5)); //======== scrollPane43 ======== { scrollPane43.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane43.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- title2 ---- title2.setRows(3); title2.setLineWrap(true); title2.setWrapStyleWord(true); title2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); scrollPane43.setViewportView(title2); } digitalObjectResourceRecordOnly.add(scrollPane43, cc.xywh(3, 5, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- actuateLabel ---- actuateLabel.setText("EAD DAO Actuate"); actuateLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(actuateLabel, DigitalObjects.class, DigitalObjects.PROPERTYNAME_EAD_DAO_ACTUATE); digitalObjectResourceRecordOnly.add(actuateLabel, cc.xy(1, 7)); //---- actuate ---- actuate.setOpaque(false); actuate.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); digitalObjectResourceRecordOnly.add(actuate, cc.xywh(3, 7, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- showLabel ---- showLabel.setText("EAD DAO Show"); showLabel.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(showLabel, DigitalObjects.class, DigitalObjects.PROPERTYNAME_EAD_DAO_SHOW); digitalObjectResourceRecordOnly.add(showLabel, cc.xy(1, 9)); //---- show ---- show.setOpaque(false); show.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); digitalObjectResourceRecordOnly.add(show, cc.xywh(3, 9, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //======== componentIDPanel ======== { componentIDPanel.setBackground(new Color(200, 205, 232)); componentIDPanel .setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec( ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, RowSpec.decodeSpecs("default"))); //---- componentLabel1 ---- componentLabel1.setText("Component ID"); componentLabel1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(componentLabel1, DigitalObjects.class, DigitalObjects.PROPERTYNAME_COMPONENT_ID); componentIDPanel.add(componentLabel1, cc.xy(1, 1)); //---- dateExpression2 ---- dateExpression2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); componentIDPanel.add(dateExpression2, cc.xy(3, 1)); } digitalObjectResourceRecordOnly.add(componentIDPanel, cc.xywh(1, 11, 3, 1)); } panel17.add(digitalObjectResourceRecordOnly, cc.xy(1, 7)); } panel13.add(panel17, cc.xywh(1, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); } add(panel13, cc.xy(3, 1)); //======== panel5 ======== { panel5.setOpaque(false); panel5.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- label_resourcesLanguageCode ---- label_resourcesLanguageCode.setText("Language"); label_resourcesLanguageCode.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_resourcesLanguageCode, DigitalObjects.class, DigitalObjects.PROPERTYNAME_LANGUAGE_CODE); panel5.add(label_resourcesLanguageCode, cc.xy(1, 1)); //---- languageCode ---- languageCode.setMaximumSize(new Dimension(50, 27)); languageCode.setOpaque(false); languageCode.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel5.add(languageCode, cc.xywh(3, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //======== repositoryPanel ======== { repositoryPanel.setOpaque(false); repositoryPanel.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.dluX(44)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.LEFT, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- label_repositoryName ---- label_repositoryName.setText("Repository :"); label_repositoryName.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label_repositoryName, Accessions.class, Accessions.PROPERTYNAME_REPOSITORY); repositoryPanel.add(label_repositoryName, cc.xy(1, 1)); //---- repositoryName ---- repositoryName.setEditable(false); repositoryName.setFocusable(false); repositoryName.setBorder(null); repositoryName.setOpaque(false); repositoryName.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); repositoryName.setHorizontalAlignment(SwingConstants.LEFT); repositoryPanel.add(repositoryName, cc.xywh(3, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- changeRepositoryButton ---- changeRepositoryButton.setText("Change Repository"); changeRepositoryButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); changeRepositoryButton.setOpaque(false); changeRepositoryButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { changeRepositoryButtonActionPerformed(); } }); repositoryPanel.add(changeRepositoryButton, cc.xy(5, 1)); } panel5.add(repositoryPanel, cc.xywh(1, 3, 3, 1)); } add(panel5, cc.xywh(1, 3, 3, 1)); //======== panel2 ======== { panel2.setBorder(new BevelBorder(BevelBorder.LOWERED)); panel2.setOpaque(false); panel2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel2.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- label1 ---- label1.setText("File Versions"); label1.setForeground(new Color(0, 0, 102)); label1.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); ATFieldInfo.assignLabelInfo(label1, DigitalObjects.class, DigitalObjects.PROPERTYNAME_FILE_VERSIONS); panel2.add(label1, new CellConstraints(1, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(5, 5, 0, 0))); //======== scrollPane6 ======== { scrollPane6.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); scrollPane6.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //---- fileVersionsTable ---- fileVersionsTable.setPreferredScrollableViewportSize(new Dimension(200, 75)); fileVersionsTable.setRowHeight(20); fileVersionsTable.setFocusable(false); fileVersionsTable.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { fileVersionTableMouseClicked(e); } }); scrollPane6.setViewportView(fileVersionsTable); } panel2.add(scrollPane6, new CellConstraints(1, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(0, 10, 0, 5))); //======== panel29 ======== { panel29.setBackground(new Color(231, 188, 251)); panel29.setOpaque(false); panel29.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel29.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- addFileVersionButton ---- addFileVersionButton.setText("Add File Version"); addFileVersionButton.setOpaque(false); addFileVersionButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); addFileVersionButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addFileVersionButtonActionPerformed(); } }); panel29.add(addFileVersionButton, cc.xy(1, 1)); //---- removeFileVersionButton ---- removeFileVersionButton.setText("Remove File Version"); removeFileVersionButton.setOpaque(false); removeFileVersionButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); removeFileVersionButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { removeFileVersionButtonActionPerformed(); } }); panel29.add(removeFileVersionButton, cc.xy(3, 1)); } panel2.add(panel29, cc.xywh(1, 5, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); } add(panel2, cc.xywh(1, 5, 3, 1)); // JFormDesigner - End of component initialization //GEN-END:initComponents }