Jedit 4.2

edu.bsu.cs.gui
Class JeditResources

java.lang.Object
  extended by edu.bsu.cs.gui.JeditResources
All Implemented Interfaces:
Serializable

public class JeditResources
extends Object
implements Serializable

Creates and maintains the Resources from a .properties document which is kept in the /classes directory.

Since:
24 May 2002
Version:
24 May 2002
Author:
Elizabeth VandenBerg from Dr. Paul Buis' ResourceManager, Sunita Upadrasta
See Also:
Serialized Form

Field Summary
protected  ResourceBundle bundle
          The ResourceBundle that holds all of the resources.
 
Constructor Summary
JeditResources(String baseName)
          Default Constructor.
JeditResources(String baseName, Locale locale)
          Constructor that sets the Resource Bundle and Locale
 
Method Summary
 KeyStroke getAccelerator(String name)
          Returns the Accelerator for the Resource.
 String getCode(String name)
          Returns the code of the resource
 Icon getIcon(String name)
          Returns the Icon for the Resource
 String getIsDisabled(String name)
          Returns if the given resource is a disabled
 String getIsSelected(String name)
          Returns if the given resource is selected
 String getIsSubmenu(String name)
          Returns if the given resource is a submenu
 String getIsToggle(String name)
          Returns if the given resource is a toggle
 String getKeyName(String code)
           
 String getLongDescription(String name)
          Returns the Description for the Resource
 Integer getMnemonicKey(String name)
          Returns the Menumonic key of the Resource Bundle.
 Icon getSelectedIcon(String name)
          Returns the Icon for the Resource
 String getShortDescription(String name)
          Returns the Description for the Resource
 String getText(String name)
           
 void prettifyAction(Action a, String name)
           
 void prettifyButton(AbstractButton button, String name)
           
 void prettifyMenuItem(JMenuItem item, String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bundle

protected ResourceBundle bundle
The ResourceBundle that holds all of the resources.

Constructor Detail

JeditResources

public JeditResources(String baseName)
Default Constructor. Sets the Resource bundle.

Parameters:
String - Name of Resource Bundle.

JeditResources

public JeditResources(String baseName,
                      Locale locale)
Constructor that sets the Resource Bundle and Locale

Parameters:
String - Name of Resource Bundle
Locale - Sets the locale for the Resource Bundle.
Method Detail

getMnemonicKey

public Integer getMnemonicKey(String name)
Returns the Menumonic key of the Resource Bundle.

Parameters:
String - Name of the Resource Bundle.
Returns:
Integer Mneumonic key of the ResourceBundle.

getAccelerator

public KeyStroke getAccelerator(String name)
Returns the Accelerator for the Resource.

Parameters:
String - Name of the Resource
Keystroke - The Accelerator for the Resource.

getIcon

public Icon getIcon(String name)
Returns the Icon for the Resource

Parameters:
String - Name of the Resource
Returns:
Icon Returns the Icon for the resource.

getSelectedIcon

public Icon getSelectedIcon(String name)
Returns the Icon for the Resource

Parameters:
String - Name of the Resource
Returns:
Icon Returns the Icon for the resource.

getText

public String getText(String name)

getShortDescription

public String getShortDescription(String name)
Returns the Description for the Resource

Parameters:
String - Name of the Resource
Returns:
String Returns the short description for the resource.

getLongDescription

public String getLongDescription(String name)
Returns the Description for the Resource

Parameters:
String - Name of the Resource
Returns:
String Returns the long description for the resource.

getIsSubmenu

public String getIsSubmenu(String name)
Returns if the given resource is a submenu

Parameters:
String - Name of the Resource
Returns:
String Returns if the resource is a submenu or not

getIsDisabled

public String getIsDisabled(String name)
Returns if the given resource is a disabled

Parameters:
String - Name of the Resource
Returns:
String Returns if the resource is disabled or not

getIsToggle

public String getIsToggle(String name)
Returns if the given resource is a toggle

Parameters:
String - Name of the Resource
Returns:
String Returns if the resource is a toggle or not

getIsSelected

public String getIsSelected(String name)
Returns if the given resource is selected

Parameters:
String - Name of the Resource
Returns:
String Returns if the resource is selected or not

getCode

public String getCode(String name)
Returns the code of the resource

Parameters:
String - Name of the Resource
Returns:
String Returns code of the resource

getKeyName

public String getKeyName(String code)

prettifyAction

public void prettifyAction(Action a,
                           String name)

prettifyButton

public void prettifyButton(AbstractButton button,
                           String name)

prettifyMenuItem

public void prettifyMenuItem(JMenuItem item,
                             String name)

Jedit 4.2