Changeset 10011
- Timestamp:
- 2005-06-03T15:21:06+12:00 (19 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 1 added
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/ClassifierManager.java
r9126 r10011 42 42 import org.greenstone.gatherer.gui.GComboBox; 43 43 import org.greenstone.gatherer.gui.GLIButton; 44 import org.greenstone.gatherer.util.JarTools; 44 45 import org.greenstone.gatherer.util.StaticStrings; 45 46 import org.greenstone.gatherer.util.Utility; … … 617 618 JPanel move_button_pane = new JPanel(); 618 619 619 move_up_button = new JButton("", Utility.getImage("arrow-up.gif"));620 move_up_button = new JButton("", JarTools.getImage("arrow-up.gif")); 620 621 move_up_button.setEnabled(false); 621 622 move_up_button.setMnemonic(KeyEvent.VK_U); 622 //move_up_button.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE);623 623 Dictionary.registerBoth(move_up_button, "CDM.Move.Move_Up", "CDM.Move.Move_Up_Tooltip"); 624 624 625 move_down_button = new JButton("", Utility.getImage("arrow-down.gif"));625 move_down_button = new JButton("", JarTools.getImage("arrow-down.gif")); 626 626 move_down_button.setEnabled(false); 627 627 move_down_button.setMnemonic(KeyEvent.VK_D); 628 //move_down_button.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE);629 628 Dictionary.registerBoth(move_down_button, "CDM.Move.Move_Down", "CDM.Move.Move_Down_Tooltip"); 630 629 -
trunk/gli/src/org/greenstone/gatherer/cdm/IndexManager.java
r9997 r10011 41 41 import org.greenstone.gatherer.metadata.MetadataSetManager; 42 42 import org.greenstone.gatherer.util.CheckList; 43 import org.greenstone.gatherer.util.JarTools; 43 44 import org.greenstone.gatherer.util.StaticStrings; 44 import org.greenstone.gatherer.util.Utility;45 45 import org.w3c.dom.*; 46 46 /** This class is resposible for storing the indexes which have been assigned to this collection and the default index, and providing methods for interacting with both these data pools. It also knows how to turn itself into a String as it would be displayed in the collection configuration file. … … 563 563 JPanel movement_pane = new JPanel(); 564 564 565 move_up_button = new JButton("", Utility.getImage("arrow-up.gif"));565 move_up_button = new JButton("", JarTools.getImage("arrow-up.gif")); 566 566 move_up_button.setEnabled(false); 567 567 move_up_button.setMnemonic(KeyEvent.VK_U); 568 568 Dictionary.registerBoth(move_up_button, "CDM.Move.Move_Up", "CDM.Move.Move_Up_Tooltip"); 569 569 570 move_down_button = new JButton("", Utility.getImage("arrow-down.gif"));570 move_down_button = new JButton("", JarTools.getImage("arrow-down.gif")); 571 571 move_down_button.setEnabled(false); 572 572 move_down_button.setMnemonic(KeyEvent.VK_D); … … 1070 1070 JPanel index_movement_panel = new JPanel(); 1071 1071 1072 move_index_up_button = new JButton("", Utility.getImage("arrow-up.gif"));1072 move_index_up_button = new JButton("", JarTools.getImage("arrow-up.gif")); 1073 1073 move_index_up_button.setEnabled(false); 1074 1074 move_index_up_button.setMnemonic(KeyEvent.VK_U); 1075 1075 Dictionary.registerBoth(move_index_up_button, "CDM.Move.Move_Up", "CDM.Move.Move_Up_Tooltip"); 1076 1076 1077 move_index_down_button = new JButton("", Utility.getImage("arrow-down.gif"));1077 move_index_down_button = new JButton("", JarTools.getImage("arrow-down.gif")); 1078 1078 move_index_down_button.setEnabled(false); 1079 1079 move_index_down_button.setMnemonic(KeyEvent.VK_D); … … 1202 1202 JPanel level_movement_panel = new JPanel(); 1203 1203 1204 move_level_up_button = new JButton("", Utility.getImage("arrow-up.gif"));1204 move_level_up_button = new JButton("", JarTools.getImage("arrow-up.gif")); 1205 1205 move_level_up_button.setEnabled(false); 1206 1206 move_level_up_button.setMnemonic(KeyEvent.VK_U); 1207 //move_level_up_button.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE);1208 1207 Dictionary.registerBoth(move_level_up_button, "CDM.Move.Move_Up", "CDM.Move.Move_Up_Tooltip"); 1209 1208 1210 move_level_down_button = new JButton("", Utility.getImage("arrow-down.gif"));1209 move_level_down_button = new JButton("", JarTools.getImage("arrow-down.gif")); 1211 1210 move_level_down_button.setEnabled(false); 1212 1211 move_level_down_button.setMnemonic(KeyEvent.VK_D); 1213 //move_level_down_button.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE);1214 1212 Dictionary.registerBoth(move_level_down_button, "CDM.Move.Move_Down", "CDM.Move.Move_Down_Tooltip"); 1215 1213 -
trunk/gli/src/org/greenstone/gatherer/cdm/LanguageManager.java
r10006 r10011 27 27 package org.greenstone.gatherer.cdm; 28 28 29 /************************************************************************************** 30 * Written: 08/05/02 31 * Revised: 17/11/02 - Commented 32 * 07/07/03 - DOM support 33 **************************************************************************************/ 29 34 30 import java.awt.*; 35 31 import java.awt.event.*; … … 43 39 import org.greenstone.gatherer.Gatherer; 44 40 import org.greenstone.gatherer.gui.GLIButton; 45 import org.greenstone.gatherer.util. Utility;41 import org.greenstone.gatherer.util.JarTools; 46 42 import org.greenstone.gatherer.util.XMLTools; 47 43 import org.w3c.dom.*; … … 323 319 324 320 JPanel movement_pane = new JPanel(); 325 move_up_button = new JButton("", Utility.getImage("arrow-up.gif"));321 move_up_button = new JButton("", JarTools.getImage("arrow-up.gif")); 326 322 move_up_button.setEnabled(false); 327 323 move_up_button.setMnemonic(KeyEvent.VK_U); 328 324 Dictionary.registerBoth(move_up_button, "CDM.Move.Move_Up", "CDM.Move.Move_Up_Tooltip"); 329 325 330 move_down_button = new JButton("", Utility.getImage("arrow-down.gif"));326 move_down_button = new JButton("", JarTools.getImage("arrow-down.gif")); 331 327 move_down_button.setEnabled(false); 332 328 move_down_button.setMnemonic(KeyEvent.VK_D); -
trunk/gli/src/org/greenstone/gatherer/cdm/PluginManager.java
r9991 r10011 46 46 import org.greenstone.gatherer.gui.ModalDialog; 47 47 import org.greenstone.gatherer.gui.WarningDialog; 48 import org.greenstone.gatherer.util.JarTools; 48 49 import org.greenstone.gatherer.util.StaticStrings; 49 50 import org.greenstone.gatherer.util.Utility; … … 747 748 Dictionary.registerText(instructions, "CDM.PlugInManager.Instructions"); 748 749 749 move_up_button = new JButton("", Utility.getImage("arrow-up.gif"));750 move_up_button = new JButton("", JarTools.getImage("arrow-up.gif")); 750 751 move_up_button.setEnabled(false); 751 752 move_up_button.setMnemonic(KeyEvent.VK_U); 752 //move_up_button.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE);753 753 Dictionary.registerBoth(move_up_button, "CDM.Move.Move_Up", "CDM.Move.Move_Up_Tooltip"); 754 754 755 move_down_button = new JButton("", Utility.getImage("arrow-down.gif"));755 move_down_button = new JButton("", JarTools.getImage("arrow-down.gif")); 756 756 move_down_button.setEnabled(false); 757 757 move_down_button.setMnemonic(KeyEvent.VK_D); 758 //move_down_button.setPreferredSize(Utility.DOUBLE_IMAGE_BUTTON_SIZE);759 758 Dictionary.registerBoth(move_down_button, "CDM.Move.Move_Down", "CDM.Move.Move_Down_Tooltip"); 760 759 -
trunk/gli/src/org/greenstone/gatherer/cdm/SearchTypeManager.java
r10008 r10011 42 42 import org.greenstone.gatherer.gui.GComboBox; 43 43 import org.greenstone.gatherer.gui.GLIButton; 44 import org.greenstone.gatherer.util. Utility;44 import org.greenstone.gatherer.util.JarTools; 45 45 import org.w3c.dom.*; 46 46 … … 229 229 JPanel movement_panel = new JPanel(); 230 230 231 move_up_button = new JButton("", Utility.getImage("arrow-up.gif"));231 move_up_button = new JButton("", JarTools.getImage("arrow-up.gif")); 232 232 move_up_button.setEnabled(false); 233 233 move_up_button.setMnemonic(KeyEvent.VK_U); … … 235 235 Dictionary.registerBoth(move_up_button, "CDM.Move.Move_Up", "CDM.Move.Move_Up_Tooltip"); 236 236 237 move_down_button = new JButton("", Utility.getImage("arrow-down.gif"));237 move_down_button = new JButton("", JarTools.getImage("arrow-down.gif")); 238 238 move_down_button.setEnabled(false); 239 239 move_down_button.setMnemonic(KeyEvent.VK_D); -
trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionIndexManager.java
r9562 r10011 37 37 import org.greenstone.gatherer.gui.GLIButton; 38 38 import org.greenstone.gatherer.util.CheckList; 39 import org.greenstone.gatherer.util. Utility;39 import org.greenstone.gatherer.util.JarTools; 40 40 import org.w3c.dom.*; 41 41 … … 263 263 264 264 JPanel movement_pane = new JPanel(); 265 move_up_button = new JButton("", Utility.getImage("arrow-up.gif"));265 move_up_button = new JButton("", JarTools.getImage("arrow-up.gif")); 266 266 move_up_button.setEnabled(false); 267 267 move_up_button.setMnemonic(KeyEvent.VK_U); 268 268 Dictionary.registerBoth(move_up_button, "CDM.Move.Move_Up", "CDM.Move.Move_Up_Tooltip"); 269 269 270 move_down_button = new JButton("", Utility.getImage("arrow-down.gif"));270 move_down_button = new JButton("", JarTools.getImage("arrow-down.gif")); 271 271 move_down_button.setEnabled(false); 272 272 move_down_button.setMnemonic(KeyEvent.VK_D); -
trunk/gli/src/org/greenstone/gatherer/collection/CollectionTreeNode.java
r9026 r10011 32 32 import org.greenstone.gatherer.cdm.CollectionDesignManager; 33 33 import org.greenstone.gatherer.file.FileNode; 34 import org.greenstone.gatherer.util. Utility;34 import org.greenstone.gatherer.util.JarTools; 35 35 36 36 … … 39 39 extends FileNode 40 40 { 41 static final public ImageIcon GREEN_FILE_ICON = Utility.getImage("greenfile.gif", true);41 static final public ImageIcon GREEN_FILE_ICON = JarTools.getImage("greenfile.gif", true); 42 42 43 43 /** Is this file a metadata database that is explodable with the explode_metadata_databases.pl script? */ -
trunk/gli/src/org/greenstone/gatherer/feedback/ActionRecorderDialog.java
r8474 r10011 16 16 import java.text.*; 17 17 18 import org.greenstone.gatherer.util. Utility;18 import org.greenstone.gatherer.util.JarTools; 19 19 20 20 /** … … 477 477 ImageIcon icon,icon2,icon3; 478 478 479 icon3 = Utility.getImage("fastsend.gif");479 icon3 = JarTools.getImage("fastsend.gif"); 480 480 item3 = new JMenuItem(messages.getString("SendFeedback"), 481 481 new ImageIcon(icon3.getImage().getScaledInstance … … 491 491 if (rec == false) 492 492 { 493 icon = Utility.getImage("feedback.gif");493 icon = JarTools.getImage("feedback.gif"); 494 494 item = new JMenuItem("Report Feedback", 495 495 new ImageIcon(icon.getImage().getScaledInstance … … 503 503 else 504 504 { 505 icon = Utility.getImage("camera.gif");505 icon = JarTools.getImage("camera.gif"); 506 506 item = new JMenuItem(messages.getString("ScreenShot"), 507 507 new ImageIcon(icon.getImage().getScaledInstance … … 514 514 } 515 515 516 icon2 = Utility.getImage("history.gif");516 icon2 = JarTools.getImage("history.gif"); 517 517 item2 = new JMenuItem(messages.getString("LookHistory"), 518 518 new ImageIcon(icon2.getImage().getScaledInstance … … 590 590 JMenuItem item; 591 591 ImageIcon icon; 592 icon = Utility.getImage("camera.gif");592 icon = JarTools.getImage("camera.gif"); 593 593 item = new JMenuItem(messages.getString("ScreenShot"), 594 594 new ImageIcon(icon.getImage().getScaledInstance … … 623 623 JMenuItem item; 624 624 ImageIcon icon; 625 icon = Utility.getImage("camera.gif");625 icon = JarTools.getImage("camera.gif"); 626 626 item = new JMenuItem(messages.getString("ScreenShot"), 627 627 new ImageIcon(icon.getImage().getScaledInstance … … 671 671 JMenuItem item; 672 672 673 icon = Utility.getImage("feedback.gif");673 icon = JarTools.getImage("feedback.gif"); 674 674 item = new JMenuItem("Report Feedback", new ImageIcon(icon.getImage().getScaledInstance(20,20,Image.SCALE_SMOOTH))); 675 675 item.setActionCommand(messages.getString("SendFeedback")); … … 702 702 JMenuItem item; 703 703 704 icon = Utility.getImage("feedback.gif");704 icon = JarTools.getImage("feedback.gif"); 705 705 item = new JMenuItem("Report Feedback", new ImageIcon(icon.getImage().getScaledInstance(20,20,Image.SCALE_SMOOTH))); 706 706 item.setActionCommand(messages.getString("SendFeedback")); -
trunk/gli/src/org/greenstone/gatherer/feedback/SelectPicture.java
r9855 r10011 19 19 import javax.swing.BorderFactory; 20 20 21 import org.greenstone.gatherer.util. Utility;21 import org.greenstone.gatherer.util.JarTools; 22 22 23 23 /** … … 346 346 ImageIcon imgicon,imgicon2; 347 347 Image img,img2; 348 imgicon = Utility.getImage("pen.gif");348 imgicon = JarTools.getImage("pen.gif"); 349 349 img = imgicon.getImage(); 350 350 img = img.getScaledInstance(24,24,Image.SCALE_SMOOTH); 351 imgicon2 = Utility.getImage("eraserpen.gif");351 imgicon2 = JarTools.getImage("eraserpen.gif"); 352 352 img2 = imgicon2.getImage(); 353 353 final Cursor cursor; … … 472 472 473 473 JButton pen; 474 pen = new JButton( Utility.getImage("penicon.gif"));474 pen = new JButton(JarTools.getImage("penicon.gif")); 475 475 pen.setText("Pen"); 476 476 pen.setPreferredSize(new Dimension(30,20)); … … 489 489 490 490 JButton eraser; 491 eraser = new JButton( Utility.getImage("eraser.gif"));491 eraser = new JButton(JarTools.getImage("eraser.gif")); 492 492 eraser.setText("Eraser"); 493 493 eraser.setActionCommand("Eraser"); -
trunk/gli/src/org/greenstone/gatherer/file/RecycleBin.java
r8785 r10011 50 50 import org.greenstone.gatherer.util.DragComponent; 51 51 import org.greenstone.gatherer.util.DragGroup; 52 import org.greenstone.gatherer.util.JarTools; 52 53 import org.greenstone.gatherer.util.Utility; 53 54 … … 73 74 public RecycleBin() 74 75 { 75 super( Utility.getImage("bin.gif"));76 super(JarTools.getImage("bin.gif")); 76 77 this.drop_target = new DropTarget(this, drag_action, this, true); 77 78 -
trunk/gli/src/org/greenstone/gatherer/gui/AboutDialog.java
r9647 r10011 35 35 import javax.swing.*; 36 36 import org.greenstone.gatherer.Dictionary; 37 import org.greenstone.gatherer.util.JarTools; 37 38 import org.greenstone.gatherer.util.Utility; 38 39 … … 59 60 * @see org.greenstone.gatherer.gui.AboutDialog.CloseButtonListener 60 61 * @see org.greenstone.gatherer.gui.GLIButton 61 * @see org.greenstone.gatherer.util.Utility#getImage62 62 * @see org.greenstone.gatherer.util.Utility#PROGRAM_NAME 63 63 * @see org.greenstone.gatherer.util.Utility#PROGRAM_VERSION … … 70 70 JPanel content_pane = (JPanel) getContentPane(); 71 71 JPanel upper_pane = new JPanel(); 72 ImageIcon icon = Utility.getImage("gatherer_medium.gif");72 ImageIcon icon = JarTools.getImage("gatherer_medium.gif"); 73 73 ImageIcon scaled_icon = new ImageIcon(icon.getImage().getScaledInstance(ICON_SIZE, ICON_SIZE, Image.SCALE_DEFAULT)); 74 74 JLabel icon_label = new JLabel(scaled_icon); -
trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java
r9801 r10011 58 58 import org.greenstone.gatherer.gui.metaaudit.MetaAuditFrame; 59 59 import org.greenstone.gatherer.gui.tree.DragTree; 60 import org.greenstone.gatherer.util.JarTools; 60 61 import org.greenstone.gatherer.util.StaticStrings; 61 62 import org.greenstone.gatherer.util.TreeSynchronizer; … … 324 325 325 326 // Pretty corner icon 326 this.setIconImage( Utility.getImage("gatherer_small.gif").getImage());327 this.setIconImage(JarTools.getImage("gatherer_small.gif").getImage()); 327 328 // BorderLayout for the main screen. I'll try my best to avoid these in subcomponents as they're space greedy. 328 329 content_pane.setLayout(new BorderLayout()); … … 344 345 download_pane = new DownloadPane(); 345 346 // "GUI.Download_Tooltip" is used automatically 346 tab_pane.addTab("GUI.Download", Utility.getImage("download.gif"), download_pane);347 tab_pane.addTab("GUI.Download", JarTools.getImage("download.gif"), download_pane); 347 348 tab_pane.setEnabledAt(tab_pane.indexOfComponent(download_pane), Configuration.get("workflow.download", false)); 348 349 } … … 352 353 if(Configuration.get("workflow.gather", true)) { 353 354 // "GUI.Gather_Tooltip" is used automatically 354 tab_pane.addTab("GUI.Gather", Utility.getImage("gather.gif"), gather_pane);355 tab_pane.addTab("GUI.Gather", JarTools.getImage("gather.gif"), gather_pane); 355 356 tab_pane.setEnabledAt(tab_pane.indexOfComponent(gather_pane), Configuration.get("workflow.gather", false)); 356 357 } … … 360 361 if(Configuration.get("workflow.enrich", true)) { 361 362 // "GUI.Enrich_Tooltip" is used automatically 362 tab_pane.addTab("GUI.Enrich", Utility.getImage("enrich.gif"), enrich_pane);363 tab_pane.addTab("GUI.Enrich", JarTools.getImage("enrich.gif"), enrich_pane); 363 364 tab_pane.setEnabledAt(tab_pane.indexOfComponent(enrich_pane), false); 364 365 } … … 368 369 if(Configuration.get("workflow.design", true)) { 369 370 // "GUI.Design_Tooltip" is used automatically 370 tab_pane.addTab("GUI.Design", Utility.getImage("design.gif"), design_pane);371 tab_pane.addTab("GUI.Design", JarTools.getImage("design.gif"), design_pane); 371 372 tab_pane.setEnabledAt(tab_pane.indexOfComponent(design_pane), false); 372 373 } … … 376 377 if(Configuration.get("workflow.create", true)) { 377 378 // "GUI.Create_Tooltip" is used automatically 378 tab_pane.addTab("GUI.Create", Utility.getImage("create.gif"), create_pane);379 tab_pane.addTab("GUI.Create", JarTools.getImage("create.gif"), create_pane); 379 380 tab_pane.setEnabledAt(tab_pane.indexOfComponent(create_pane), false); 380 381 } -
trunk/gli/src/org/greenstone/gatherer/gui/GatherPane.java
r9855 r10011 61 61 import org.greenstone.gatherer.util.DragComponent; 62 62 import org.greenstone.gatherer.util.DragGroup; 63 import org.greenstone.gatherer.util.JarTools; 63 64 import org.greenstone.gatherer.util.TreeSynchronizer; 64 65 import org.greenstone.gatherer.util.Utility; … … 142 143 Dictionary.registerBoth(stop_action, "Collection.Stop", "Collection.Stop_Tooltip"); 143 144 144 new_folder = new GLIButton( Utility.getImage("folder.gif"));145 new_folder = new GLIButton(JarTools.getImage("folder.gif")); 145 146 new_folder.addActionListener(this); 146 147 new_folder.setEnabled(false); -
trunk/gli/src/org/greenstone/gatherer/gui/HelpFrame.java
r10009 r10011 47 47 import org.greenstone.gatherer.DebugStream; 48 48 import org.greenstone.gatherer.Dictionary; 49 import org.greenstone.gatherer.util.JarTools; 49 50 import org.greenstone.gatherer.util.StaticStrings; 50 51 import org.greenstone.gatherer.util.Utility; … … 109 110 110 111 // Pretty corner icon 111 this.setIconImage( Utility.getImage("gatherer_small.gif").getImage());112 this.setIconImage(JarTools.getImage("gatherer_small.gif").getImage()); 112 113 113 114 self = this; -
trunk/gli/src/org/greenstone/gatherer/gui/LockFileDialog.java
r9036 r10011 43 43 import org.greenstone.gatherer.Configuration; 44 44 import org.greenstone.gatherer.Dictionary; 45 import org.greenstone.gatherer.util. Utility;45 import org.greenstone.gatherer.util.JarTools; 46 46 import org.greenstone.gatherer.util.XMLTools; 47 47 import org.w3c.dom.*; … … 76 76 JPanel content_pane = (JPanel) getContentPane(); 77 77 JPanel upper_pane = new JPanel(); 78 ImageIcon icon = Utility.getImage("lcolicn.gif");78 ImageIcon icon = JarTools.getImage("lcolicn.gif"); 79 79 ImageIcon scaled_icon = new ImageIcon(icon.getImage().getScaledInstance(ICON_SIZE, ICON_SIZE, Image.SCALE_DEFAULT)); 80 80 JLabel icon_label = new JLabel(scaled_icon); -
trunk/gli/src/org/greenstone/gatherer/gui/MetadataValueTablePane.java
r9856 r10011 44 44 import org.greenstone.gatherer.metadata.MetadataValueTableModel; 45 45 import org.greenstone.gatherer.metadata.MetadataXMLFileManager; 46 import org.greenstone.gatherer.util.JarTools; 46 47 import org.greenstone.gatherer.util.Utility; 47 48 … … 322 323 // First column: inherited metadata icon 323 324 if (column == 0 && value != null) { 324 component = new JLabel( Utility.getImage("upfolder.gif"));325 component = new JLabel(JarTools.getImage("upfolder.gif")); 325 326 } 326 327 -
trunk/gli/src/org/greenstone/gatherer/gui/OpenCollectionDialog.java
r8240 r10011 49 49 import org.greenstone.gatherer.collection.BasicCollectionConfiguration; 50 50 import org.greenstone.gatherer.collection.CollectionManager; 51 import org.greenstone.gatherer.util.JarTools; 51 52 import org.greenstone.gatherer.util.StaticStrings; 52 53 import org.greenstone.gatherer.util.Utility; … … 54 55 public class OpenCollectionDialog 55 56 extends JFileChooser { 56 static final private ImageIcon LOCKED_COLLECTION_ICON = Utility.getImage("lcolicn.gif");57 static final private ImageIcon NORMAL_COLLECTION_ICON = Utility.getImage("ncolicn.gif");57 static final private ImageIcon LOCKED_COLLECTION_ICON = JarTools.getImage("lcolicn.gif"); 58 static final private ImageIcon NORMAL_COLLECTION_ICON = JarTools.getImage("ncolicn.gif"); 58 59 /** The name of the mouse listener that initiates editing on a double click. */ 59 60 static final private String SINGLE_CLICK_LISTENER = "SingleClickListener"; -
trunk/gli/src/org/greenstone/gatherer/gui/WarningDialog.java
r9864 r10011 33 33 import org.greenstone.gatherer.Dictionary; 34 34 import org.greenstone.gatherer.Gatherer; 35 import org.greenstone.gatherer.util. Utility;35 import org.greenstone.gatherer.util.JarTools; 36 36 37 37 … … 74 74 JPanel content_pane = (JPanel) getContentPane(); 75 75 JPanel text_pane = new JPanel(); 76 JLabel icon_label = new JLabel( Utility.getImage("gatherer_medium.gif"));76 JLabel icon_label = new JLabel(JarTools.getImage("gatherer_medium.gif")); 77 77 78 78 JTextArea text_area = new JTextArea(); -
trunk/gli/src/org/greenstone/gatherer/gui/metaaudit/HeaderRenderer.java
r8243 r10011 41 41 import javax.swing.table.TableCellRenderer; 42 42 import org.greenstone.gatherer.Dictionary; 43 import org.greenstone.gatherer.util. Utility;43 import org.greenstone.gatherer.util.JarTools; 44 44 45 45 /** This custom button renderer replaces the boring old column headers with clickable versions which are based on JToggleButtons. … … 52 52 53 53 /** The constructor sets up a margin around the button, and adds the filter icons. 54 * @see org.greenstone.gatherer.util.Utility55 54 */ 56 55 public HeaderRenderer() { 57 56 setMargin(new Insets(0,0,0,0)); 58 setIcon( Utility.getImage("filter.gif"));59 setSelectedIcon( Utility.getImage("filter-on.gif"));57 setIcon(JarTools.getImage("filter.gif")); 58 setSelectedIcon(JarTools.getImage("filter-on.gif")); 60 59 } 61 60 -
trunk/gli/src/org/greenstone/gatherer/util/Utility.java
r10010 r10011 412 412 413 413 414 /** Method to retrieve an image icon with the given filename found in classpath or the resouces directory.415 * @return The specified <strong>ImageIcon</strong>, or an error image replacement if no such images exists.416 */417 static public ImageIcon getImage(String filename) {418 return getImage(filename, false);419 }420 421 static public ImageIcon getImage(String filename, boolean wait_until_complete)422 {423 ImageIcon image = new ImageIcon(base.getResource("/images/" + filename));424 if (image == null) {425 image = ERROR_ICON;426 }427 428 if (wait_until_complete) {429 int load_status;430 do {431 load_status = image.getImageLoadStatus();432 }433 while (load_status != MediaTracker.ABORTED && load_status != MediaTracker.ERRORED && load_status != MediaTracker.COMPLETE);434 }435 436 return image;437 }438 439 440 414 /** Method which constructs the import directory given a certain collection. 441 415 * @param col_dir The location of the collection directory as a <strong>String</strong>.
Note:
See TracChangeset
for help on using the changeset viewer.