| | |
| | | addActionListeners(); |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Object getFieldValue(FieldName fieldName) |
| | | { |
| | | Object value = null; |
| | |
| | | return value; |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void displayFieldInvalid(FieldName fieldName, boolean invalid) |
| | | { |
| | | JLabel label = getLabel(fieldName); |
| | |
| | | } |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | protected Component createInputPanel() |
| | | { |
| | | JPanel panel = new JPanel(new GridBagLayout()); |
| | |
| | | return panel; |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | protected LocalizableMessage getInstructions() |
| | | { |
| | | return INFO_DATA_REPLICATION_OPTIONS_PANEL_INSTRUCTIONS.get(); |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | protected LocalizableMessage getTitle() |
| | | { |
| | | return INFO_DATA_REPLICATION_OPTIONS_PANEL_TITLE.get(); |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void endDisplay() |
| | | { |
| | | if (lastFocusComponent != null) |
| | |
| | | } |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | protected LocalizableMessage getTextForIcon(UIFactory.IconType iconType) |
| | | { |
| | | if (iconType == UIFactory.IconType.WAIT && |
| | |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * Creates the components and populates the Maps with them. |
| | | */ |
| | | /** Creates the components and populates the Maps with them. */ |
| | | private void populateComponentMaps() |
| | | { |
| | | HashMap<FieldName, LabelFieldDescriptor> hm = new HashMap<>(); |
| | |
| | | checkEnablingState(); |
| | | } |
| | | |
| | | /** |
| | | * Adds all the required document listeners to the fields. |
| | | */ |
| | | /** Adds all the required document listeners to the fields. */ |
| | | private void addDocumentListeners() |
| | | { |
| | | FieldName[] fields = { |
| | |
| | | for (FieldName field : fields) { |
| | | JTextComponent tf = getField(field); |
| | | tf.getDocument().addDocumentListener(new DocumentListener() { |
| | | @Override |
| | | public void changedUpdate(DocumentEvent ev) { |
| | | if (!rbReplicated.isSelected()) { |
| | | rbReplicated.setSelected(true); |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void insertUpdate(DocumentEvent ev) { |
| | | changedUpdate(ev); |
| | | } |
| | | |
| | | @Override |
| | | public void removeUpdate(DocumentEvent ev) { |
| | | changedUpdate(ev); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * Adds the required focus listeners to the fields. |
| | | */ |
| | | /** Adds the required focus listeners to the fields. */ |
| | | private void addFocusListeners() |
| | | { |
| | | final FocusListener l = new FocusListener() |
| | | { |
| | | @Override |
| | | public void focusGained(FocusEvent e) |
| | | { |
| | | lastFocusComponent = e.getComponent(); |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void focusLost(FocusEvent e) |
| | | { |
| | | } |
| | |
| | | lastFocusComponent = rbStandalone; |
| | | } |
| | | |
| | | /** |
| | | * Adds the required focus listeners to the fields. |
| | | */ |
| | | /** Adds the required focus listeners to the fields. */ |
| | | private void addActionListeners() |
| | | { |
| | | final ActionListener l = new ActionListener() |
| | | { |
| | | @Override |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | checkEnablingState(); |
| | |
| | | cbTopologyExists.addActionListener(l); |
| | | cbTopologyExists.addActionListener(new ActionListener() |
| | | { |
| | | @Override |
| | | public void actionPerformed(ActionEvent ev) |
| | | { |
| | | if (cbTopologyExists.isSelected()) |
| | |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * Enables/disables the fields. |
| | | */ |
| | | /** Enables/disables the fields. */ |
| | | private void checkEnablingState() |
| | | { |
| | | boolean enableFields = rbReplicated.isSelected() && |