private void jbInit() { setSize(ApplicationContext.getDefaultMainFrame().getDefaultInternalFrameSize()); setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); addPropertyChangeListener(this); addVetoableChangeListener(this); // main tabbed pane JTabbedPane intermediateTabbedPane = new JTabbedPane(); getContentPane().add(intermediateTabbedPane, BorderLayout.CENTER); // data Model section... String[] orOptionTabs = getListOptionTabs(DbORNotation.class, "listOptionTabs"); // NOT LOCALIZABLE for (int i = 0; i < orOptionTabs.length; i = i + 4) { String[] optionsName = new String[] { orOptionTabs[i], orOptionTabs[i + 1], orOptionTabs[i + 2], orOptionTabs[i + 3] }; orNotationComponent = new NotationComponent(this, DbORNotation.metaClass, DbORNotation.fBuiltIn, optionsName); orNotationbankComponent = new NotationBankComponent(this, DbORNotation.metaClass, optionsName, false); JSplitPane dataSP = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, orNotationbankComponent, orNotationComponent); intermediateTabbedPane.addTab(DATA_MODEL, dataSP); } // Process model section... if (ScreenPerspective.isFullVersion()) { String[] beOptionTabs = getListOptionTabs(DbBENotation.class, "listOptionTabs"); // NOT LOCALIZABLE for (int i = 0; i < beOptionTabs.length; i = i + 4) { String[] optionsName = new String[] { beOptionTabs[i], beOptionTabs[i + 1], beOptionTabs[i + 2], beOptionTabs[i + 3] }; beNotationComponent = new NotationComponent(this, DbBENotation.metaClass, DbBENotation.fBuiltIn, optionsName); beNotationbankComponent = new NotationBankComponent(this, DbBENotation.metaClass, optionsName, false); JSplitPane dataSP = new JSplitPane( JSplitPane.HORIZONTAL_SPLIT, beNotationbankComponent, beNotationComponent); intermediateTabbedPane.addTab(BUSINESS_PROCESS_MODEL, dataSP); } // UML model section... for (int i = 0; i < beOptionTabs.length; i = i + 4) { String[] optionsName = new String[] { beOptionTabs[i], beOptionTabs[i + 1], beOptionTabs[i + 2], beOptionTabs[i + 3] }; umlNotationComponent = new NotationComponent(this, DbBENotation.metaClass, DbBENotation.fBuiltIn, optionsName); umlNotationbankComponent = new NotationBankComponent(this, DbBENotation.metaClass, optionsName, true); JSplitPane dataSP = new JSplitPane( JSplitPane.HORIZONTAL_SPLIT, umlNotationbankComponent, umlNotationComponent); intermediateTabbedPane.addTab(UML_MODEL, dataSP); } } // end if /** Control Button Panel */ JPanel btnPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT, 5, 5)); btnPanel.setBorder(BorderFactory.createEmptyBorder(12, 6, 6, 6)); getContentPane().add(btnPanel, BorderLayout.SOUTH); btnPanel.add(applyBtn); btnPanel.add(closeCancelBtn); // HIDEHELPforV1//btnPanel.add(helpBtn); applyBtn.setEnabled(false); applyBtn.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { applyChanges(); } }); closeCancelBtn.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { close(); } }); helpBtn.setEnabled(ApplicationContext.getDefaultMainFrame().isHelpInstalled()); helpBtn.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { helpBtn_actionPerformed(e); } }); AwtUtil.normalizeComponentDimension(jButtonList, jPossibleButtonList); intermediateTabbedPane.setSelectedIndex(_lastSelectedIndex); intermediateTabbedPane.addChangeListener(this); }
private void jbInit() throws Exception { this.getContentPane().setLayout(new BorderLayout()); nameChkBox.setText(NAME2); physNameChkBox.setText(PHYSICAL_NAME2); aliasChkBox.setText(ALIAS2); descripChkBox.setText(DESC); stereotypeChkBox.setText(UML_STEREO); typeLabel.setToolTipText(""); typeLabel.setText(TYPE); typeLabel.setIcon(mandatoryIcon); lengthLabel.setText(LEN); lengthLabel.setIcon(mandatoryIcon); nbDecLabel.setText(NB_DECS); nbDecLabel.setIcon(mandatoryIcon); nullLabel.setText(NULL); nullLabel.setIcon(mandatoryIcon); ooPropLabel.setText(OO_PROPERTIES); ooPropLabel.setIcon(mandatoryIcon); cancelBtn.setText(CANCEL); propaglBtn.setText(PROPAGATE); optionalPanel.setBorder(optionalTitle); mandatoryPanel.setBorder(mandatoryTitle); AwtUtil.normalizeComponentDimension(new JButton[] {propaglBtn, cancelBtn}); this.getContentPane().add(mainPanel); mainPanel.add( optionalPanel, new GridBagConstraints( 0, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(12, 12, 11, 5), 20, 0)); optionalPanel.add( nameChkBox, new GridBagConstraints( 0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 11), 0, 0)); optionalPanel.add( physNameChkBox, new GridBagConstraints( 0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 1), 0, 0)); optionalPanel.add( aliasChkBox, new GridBagConstraints( 0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 1), 0, 0)); optionalPanel.add( descripChkBox, new GridBagConstraints( 0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, 11), 0, 0)); optionalPanel.add( stereotypeChkBox, new GridBagConstraints( 0, 4, 1, 1, 0.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 11, 11), 0, 0)); optionalPanel.add( Box.createHorizontalStrut(150), new GridBagConstraints( 0, 5, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); mainPanel.add( mandatoryPanel, new GridBagConstraints( 1, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(12, 6, 11, 11), 20, 0)); mandatoryPanel.add( typeLabel, new GridBagConstraints( 0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(4, 3, 4, 11), 0, 0)); mandatoryPanel.add( lengthLabel, new GridBagConstraints( 0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(4, 3, 4, 11), 0, 0)); mandatoryPanel.add( nbDecLabel, new GridBagConstraints( 0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(4, 3, 4, 11), 0, 0)); mandatoryPanel.add( nullLabel, new GridBagConstraints( 0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(4, 3, 4, 11), 0, 0)); mandatoryPanel.add( ooPropLabel, new GridBagConstraints( 0, 4, 1, 1, 0.0, 1.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(4, 3, 11, 11), 0, 0)); mandatoryPanel.add( Box.createHorizontalStrut(150), new GridBagConstraints( 0, 5, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); mainPanel.add( buttonPanel, new GridBagConstraints( 0, 1, 2, 1, 1.0, 1.0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); buttonPanel.add( Box.createHorizontalGlue(), new GridBagConstraints( 0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); buttonPanel.add( propaglBtn, new GridBagConstraints( 1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(6, 12, 12, 6), 0, 0)); buttonPanel.add( cancelBtn, new GridBagConstraints( 2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(6, 5, 12, 11), 0, 0)); }