Changeset 8367
- Timestamp:
- 2004-10-19T09:15:29+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/EnrichPane.java
r8364 r8367 89 89 static final private String TABLE_CARD_NO_METADATA_AVAILABLE = "No metadata available"; 90 90 91 private JTextField metadata_value_text_field = null; 91 92 /** The MetadataValueTree graphically shows the available metadata that has been previously assigned, and provides controls for adding, updating and removing metadata, depending on the user's selections in the other important components. */ 92 93 private MetadataValueTree metadata_value_tree = null; … … 170 171 Dictionary.registerBoth(expand_for_extracted, "MetaEdit.Expand", "MetaEdit.Expand_Tooltip"); 171 172 173 metadata_value_text_field = new JTextField(); 172 174 metadata_value_table = new MetadataValueTable(); 173 175 metadata_value_tree = new MetadataValueTree(CONTROL_SIZE.width, CONTROL_SIZE.height); … … 737 739 738 740 changeSelection(optimal_row_to_select, 1, false, false); 741 metadata_value_text_field.requestFocus(); 739 742 } 740 743 … … 839 842 repostEvent(e); 840 843 } 841 else if (isRequestFocusEnabled()) { 842 requestFocus(); 843 } 844 // Commented this out and added the line below it to keep the value text field in focus 845 // else if (isRequestFocusEnabled()) { 846 // requestFocus(); 847 // } 848 metadata_value_text_field.requestFocus(); 844 849 845 850 CellEditor editor = getCellEditor(); … … 955 960 private MetadataElement selected_metadata_element = null; 956 961 private JTextArea extracted_message; 957 private JTextField value;958 962 private JTree tree; 959 963 … … 976 980 977 981 JPanel value_field_pane = new JPanel(); 978 value = new JTextField(); 979 value.setBackground(Configuration.getColor("coloring.editable_background", false)); 980 value.setForeground(Configuration.getColor("coloring.editable_foreground", false)); 981 value.setPreferredSize(new Dimension(413, 24)); 982 value.getDocument().addDocumentListener(new DocumentListenerImpl()); 983 value.addKeyListener(new MetadataFieldListener()); 984 value.setFocusTraversalKeysEnabled(false); 985 Dictionary.setTooltip(value, "MetaEdit.Value_Field_Tooltip"); 982 metadata_value_text_field.setBackground(Configuration.getColor("coloring.editable_background", false)); 983 metadata_value_text_field.setForeground(Configuration.getColor("coloring.editable_foreground", false)); 984 metadata_value_text_field.setPreferredSize(new Dimension(413, 24)); 985 metadata_value_text_field.getDocument().addDocumentListener(new DocumentListenerImpl()); 986 metadata_value_text_field.addKeyListener(new MetadataFieldListener()); 987 metadata_value_text_field.setFocusTraversalKeysEnabled(false); 988 Dictionary.setTooltip(metadata_value_text_field, "MetaEdit.Value_Field_Tooltip"); 986 989 987 990 JPanel button_pane = new JPanel(); … … 1010 1013 value_field_pane.setBorder(BorderFactory.createEmptyBorder(0,5,0,5)); 1011 1014 value_field_pane.setLayout(new BorderLayout(0, 0)); 1012 value_field_pane.add( value, BorderLayout.CENTER);1015 value_field_pane.add(metadata_value_text_field, BorderLayout.CENTER); 1013 1016 1014 1017 button_pane.setBorder(BorderFactory.createEmptyBorder(5,0,0,0)); … … 1094 1097 public String getSelectedValue() 1095 1098 { 1096 return value.getText().replaceAll("\\\\", MetadataValueTreeNode.METADATA_VALUE_TREE_NODE_HIERARCHY_TOKEN);1099 return metadata_value_text_field.getText().replaceAll("\\\\", MetadataValueTreeNode.METADATA_VALUE_TREE_NODE_HIERARCHY_TOKEN); 1097 1100 } 1098 1101 … … 1148 1151 if (!card_showing.equals(NONE)) { 1149 1152 manual_text_edit_event = metadata_value.equals(""); // Set to false unless val == "" 1150 value.setText(metadata_value);1153 metadata_value_text_field.setText(metadata_value); 1151 1154 manual_text_edit_event = true; 1152 1155 }
Note:
See TracChangeset
for help on using the changeset viewer.