edu.princeton.toy
public class TImageManager extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
| static short | MACHINE_SCALED_BUTTON_ENTER_OFFThe index of the unlit state of the Enter button. | 
| static short | MACHINE_SCALED_BUTTON_ENTER_ONThe index of the lit state of the Enter button. | 
| static short | MACHINE_SCALED_BUTTON_INTERRUPT_OFFThe index of the unlit state of the Interrupt button. | 
| static short | MACHINE_SCALED_BUTTON_INTERRUPT_ONThe index of the lit state of the Interrupt button. | 
| static short | MACHINE_SCALED_BUTTON_LOAD_OFFThe index of the unlit state of the Load button. | 
| static short | MACHINE_SCALED_BUTTON_LOAD_ONThe index of the lit state of the Load button. | 
| static short | MACHINE_SCALED_BUTTON_LOOK_OFFThe index of the unlit state of the Look button. | 
| static short | MACHINE_SCALED_BUTTON_LOOK_ONThe index of the lit state of the Look button. | 
| static short | MACHINE_SCALED_BUTTON_RESET_OFFThe index of the unlit state of the Reset button. | 
| static short | MACHINE_SCALED_BUTTON_RESET_ONThe index of the lit state of the Reset button. | 
| static short | MACHINE_SCALED_BUTTON_RUN_OFFThe index of the unlit state of the Run button. | 
| static short | MACHINE_SCALED_BUTTON_RUN_ONThe index of the lit state of the Run button. | 
| static short | MACHINE_SCALED_BUTTON_STEP_OFFThe index of the unlit state of the Step button. | 
| static short | MACHINE_SCALED_BUTTON_STEP_ONThe index of the lit state of the Step button. | 
| static short | MACHINE_SCALED_DIGIT_BLANKThe index of the blank LCD digit. | 
| static short[] | MACHINE_SCALED_DIGITSThe indices of the LCD Digits. | 
| static byte | MACHINE_SCALED_IMAGE_GROUPThe index of the machine scaled image group. | 
| static short | MACHINE_SCALED_LABEL_ADDRThe index of the "ADDR" label. | 
| static short | MACHINE_SCALED_LABEL_DATAThe index of the "DATA" label. | 
| static short | MACHINE_SCALED_LABEL_INSTRThe index of the "INSTR" label. | 
| static short | MACHINE_SCALED_LABEL_INWAITThe index of the "INWAIT" label. | 
| static short | MACHINE_SCALED_LABEL_PCThe index of the "PC" label. | 
| static short | MACHINE_SCALED_LABEL_READYThe index of the "READY" label. | 
| static short | MACHINE_SCALED_LABEL_STDOUTThe index of the "STDOUT" label. | 
| static short | MACHINE_SCALED_LIGHT_OFFThe index of the unlit state of the light. | 
| static short | MACHINE_SCALED_LIGHT_ONThe index of the lit state of the light. | 
| static short | MACHINE_SCALED_SWITCH_OFFThe index of the down state of the switch. | 
| static short | MACHINE_SCALED_SWITCH_ONThe index of the up state of the switch. | 
| static int[] | MAX_SCALEThe maximum scale to which the images can be scaled. | 
| static int[] | ORIGINAL_IMAGE_SCALESThe scale by which the raw images are loaded. | 
| static short | REGULAR_UNSCALED_CHECK_SYNTAX_ICONThe index of the check syntax icon for the toolbar. | 
| static short | REGULAR_UNSCALED_DEBUG_MODE_ICON_OFFThe index of the debug mode off icon for the toolbar. | 
| static short | REGULAR_UNSCALED_DEBUG_MODE_ICON_ONThe index of the debug mode on icon for the toolbar. | 
| static short | REGULAR_UNSCALED_EDIT_MODE_ICON_OFFThe index of the edit mode off icon for the toolbar. | 
| static short | REGULAR_UNSCALED_EDIT_MODE_ICON_ONThe index of the edit mode on icon for the toolbar. | 
| static short | REGULAR_UNSCALED_FRAME_ICON_OTHER_OSThe index of the icon for the frame. | 
| static short | REGULAR_UNSCALED_FRAME_ICON_WINDOWSThe index of the icon for the frame. | 
| static byte | REGULAR_UNSCALED_IMAGE_GROUPThe index of the regular unscaled image group. | 
| static short | REGULAR_UNSCALED_INTERRUPT_ICONThe index of the interrupt icon for the toolbar. | 
| static short | REGULAR_UNSCALED_NEW_ICONThe index of the new icon for the toolbar. | 
| static short | REGULAR_UNSCALED_OPEN_EXAMPLE_ICONThe index of the open example icon for the toolbar. | 
| static short | REGULAR_UNSCALED_OPEN_ICONThe index of the open icon for the toolbar. | 
| static short | REGULAR_UNSCALED_RESET_ICONThe index of the reset icon for the toolbar. | 
| static short | REGULAR_UNSCALED_RUN_ICONThe index of the run icon for the toolbar. | 
| static short | REGULAR_UNSCALED_SAVE_ALL_ICONThe index of the save all icon for the toolbar. | 
| static short | REGULAR_UNSCALED_SAVE_AS_ICONThe index of the save as icon for the toolbar. | 
| static short | REGULAR_UNSCALED_SAVE_ICONThe index of the save icon for the toolbar. | 
| static short | REGULAR_UNSCALED_SIM_MODE_ICON_OFFThe index of the sim mode off icon for the toolbar. | 
| static short | REGULAR_UNSCALED_SIM_MODE_ICON_ONThe index of the sim mode on icon for the toolbar. | 
| static short | REGULAR_UNSCALED_STEP_ICONThe index of the step icon for the toolbar. | 
| static java.lang.String[][] | SCALED_IMAGE_PATHSThe paths to all the scaled images, relative to the root of the jar file. | 
| static byte | STARTUP_UNSCALED_IMAGE_GROUPThe index of the startup unscaled image group. | 
| static short | STARTUP_UNSCALED_SPLASH_BACKGROUNDThe index of the splash window's background | 
| static byte | STDIO_SCALED_IMAGE_GROUPThe index of the stdio scaled image group. | 
| static short | STDIO_SCALED_PUNCHCARD_DISABLEDThe index of the punch card in its disabled state. | 
| static short | STDIO_SCALED_PUNCHCARD_SELECTEDThe index of the punch card in its selected state. | 
| static short | STDIO_SCALED_PUNCHCARD_UNSELECTEDThe index of the punch card in its unselected state. | 
| static java.lang.String[][] | UNSCALED_IMAGE_PATHSThe paths to all the unscaled images, relative to the root of the jar file. | 
| Modifier and Type | Method and Description | 
|---|---|
| static javax.swing.Icon | getIcon(byte scaledGroupId,
       int scale,
       short index)Returns the requested scaled image encapsulated in an icon. | 
| static javax.swing.Icon | getIcon(byte unscaledGroupId,
       short index)Returns the requested unscaled image encapsulated in an icon. | 
| static java.awt.Image | getImage(byte scaledGroupId,
        int scale,
        short index)Returns the requested scaled image. | 
| static java.awt.Image | getImage(byte unscaledGroupId,
        short index)Returns the requested unscaled image. | 
| static boolean | isPrepared(byte unscaledGroupId)Returns wheter or not a group of unscaled images has been prepared. | 
| static boolean | isPrepared(byte scaledGroupId,
          int scale)Returns wheter or not a group of scaled images has been prepared. | 
| static void | prepare(byte unscaledGroupId)Returns only when a group of unscaled images has been prepared. | 
| static void | prepare(byte scaledGroupId,
       int scale)Returns only when a group of scaled images has been prepared. | 
public static final java.lang.String[][] UNSCALED_IMAGE_PATHS
public static final byte STARTUP_UNSCALED_IMAGE_GROUP
public static final short STARTUP_UNSCALED_SPLASH_BACKGROUND
public static final byte REGULAR_UNSCALED_IMAGE_GROUP
public static final short REGULAR_UNSCALED_FRAME_ICON_WINDOWS
getImage(byte, short), 
Constant Field Valuespublic static final short REGULAR_UNSCALED_FRAME_ICON_OTHER_OS
getImage(byte, short), 
Constant Field Valuespublic static final short REGULAR_UNSCALED_NEW_ICON
getImage(byte, short), 
Constant Field Valuespublic static final short REGULAR_UNSCALED_OPEN_ICON
getImage(byte, short), 
Constant Field Valuespublic static final short REGULAR_UNSCALED_OPEN_EXAMPLE_ICON
getImage(byte, short), 
Constant Field Valuespublic static final short REGULAR_UNSCALED_SAVE_ICON
getImage(byte, short), 
Constant Field Valuespublic static final short REGULAR_UNSCALED_SAVE_AS_ICON
getImage(byte, short), 
Constant Field Valuespublic static final short REGULAR_UNSCALED_SAVE_ALL_ICON
getImage(byte, short), 
Constant Field Valuespublic static final short REGULAR_UNSCALED_EDIT_MODE_ICON_OFF
getImage(byte, short), 
Constant Field Valuespublic static final short REGULAR_UNSCALED_EDIT_MODE_ICON_ON
getImage(byte, short), 
Constant Field Valuespublic static final short REGULAR_UNSCALED_DEBUG_MODE_ICON_OFF
getImage(byte, short), 
Constant Field Valuespublic static final short REGULAR_UNSCALED_DEBUG_MODE_ICON_ON
getImage(byte, short), 
Constant Field Valuespublic static final short REGULAR_UNSCALED_SIM_MODE_ICON_OFF
getImage(byte, short), 
Constant Field Valuespublic static final short REGULAR_UNSCALED_SIM_MODE_ICON_ON
getImage(byte, short), 
Constant Field Valuespublic static final short REGULAR_UNSCALED_RESET_ICON
getImage(byte, short), 
Constant Field Valuespublic static final short REGULAR_UNSCALED_STEP_ICON
getImage(byte, short), 
Constant Field Valuespublic static final short REGULAR_UNSCALED_RUN_ICON
getImage(byte, short), 
Constant Field Valuespublic static final short REGULAR_UNSCALED_INTERRUPT_ICON
getImage(byte, short), 
Constant Field Valuespublic static final short REGULAR_UNSCALED_CHECK_SYNTAX_ICON
getImage(byte, short), 
Constant Field Valuespublic static final java.lang.String[][] SCALED_IMAGE_PATHS
public static final int[] ORIGINAL_IMAGE_SCALES
getImage(byte, int, short)public static final int[] MAX_SCALE
getImage(byte, int, short)public static final byte MACHINE_SCALED_IMAGE_GROUP
public static final short MACHINE_SCALED_BUTTON_ENTER_OFF
public static final short MACHINE_SCALED_BUTTON_ENTER_ON
public static final short MACHINE_SCALED_BUTTON_INTERRUPT_OFF
public static final short MACHINE_SCALED_BUTTON_INTERRUPT_ON
public static final short MACHINE_SCALED_BUTTON_LOAD_OFF
public static final short MACHINE_SCALED_BUTTON_LOAD_ON
public static final short MACHINE_SCALED_BUTTON_LOOK_OFF
public static final short MACHINE_SCALED_BUTTON_LOOK_ON
public static final short MACHINE_SCALED_BUTTON_RESET_OFF
public static final short MACHINE_SCALED_BUTTON_RESET_ON
public static final short MACHINE_SCALED_BUTTON_RUN_OFF
public static final short MACHINE_SCALED_BUTTON_RUN_ON
public static final short MACHINE_SCALED_BUTTON_STEP_OFF
public static final short MACHINE_SCALED_BUTTON_STEP_ON
public static final short MACHINE_SCALED_LABEL_ADDR
public static final short MACHINE_SCALED_LABEL_DATA
public static final short MACHINE_SCALED_LABEL_INSTR
public static final short MACHINE_SCALED_LABEL_INWAIT
public static final short MACHINE_SCALED_LABEL_PC
public static final short MACHINE_SCALED_LABEL_READY
public static final short MACHINE_SCALED_LABEL_STDOUT
public static final short MACHINE_SCALED_SWITCH_OFF
public static final short MACHINE_SCALED_SWITCH_ON
public static final short MACHINE_SCALED_LIGHT_OFF
public static final short MACHINE_SCALED_LIGHT_ON
public static final short MACHINE_SCALED_DIGIT_BLANK
public static final short[] MACHINE_SCALED_DIGITS
getImage(byte, int, short)public static final byte STDIO_SCALED_IMAGE_GROUP
public static final short STDIO_SCALED_PUNCHCARD_DISABLED
public static final short STDIO_SCALED_PUNCHCARD_UNSELECTED
public static final short STDIO_SCALED_PUNCHCARD_SELECTED
public static boolean isPrepared(byte unscaledGroupId)
unscaledGroupId - The id of the group in question.  An invalid value will result in
 an ArrayIndexOutOfBoundsException.STARTUP_UNSCALED_IMAGE_GROUP, 
REGULAR_UNSCALED_IMAGE_GROUPpublic static boolean isPrepared(byte scaledGroupId,
                 int scale)
scaledGroupId - The id of the group in question.  An invalid value will result in
 an ArrayIndexOutOfBoundsException.scale - The scale in question.  An invalid value will result in an
 ArrayIndexOutOfBoundsException.STARTUP_UNSCALED_IMAGE_GROUP, 
REGULAR_UNSCALED_IMAGE_GROUPpublic static void prepare(byte unscaledGroupId)
unscaledGroupId - The id of the group in question.  An invalid value will result in
 an ArrayIndexOutOfBoundsException.public static void prepare(byte scaledGroupId,
           int scale)
scaledGroupId - The id of the group in question.  An invalid value will result in
 an ArrayIndexOutOfBoundsException.scale - The desired scale of the image.  An invalid value will result in an
 ArrayIndexOutOfBoundsException.public static java.awt.Image getImage(byte unscaledGroupId,
                      short index)
unscaledGroupId - The id of the group to which the image belongs.  An invalid value will
 result in an ArrayIndexOutOfBoundsException.index - The index of the image in that group.  An invalid value will result in an
 ArrayIndexOutOfBoundsException.public static javax.swing.Icon getIcon(byte unscaledGroupId,
                       short index)
unscaledGroupId - The id of the group to which the image belongs.  An invalid value will
 result in an ArrayIndexOutOfBoundsException.index - The index of the image in that group.  An invalid value will result in an
 ArrayIndexOutOfBoundsException.public static java.awt.Image getImage(byte scaledGroupId,
                      int scale,
                      short index)
scaledGroupId - The id of the group to which the image belongs.  An invalid value will
 result in an ArrayIndexOutOfBoundsException.scale - The desired scale of the image.  An invalid value will result in an
 ArrayIndexOutOfBoundsException.index - The index of the image in that group.  An invalid value will result in an
 ArrayIndexOutOfBoundsException.public static javax.swing.Icon getIcon(byte scaledGroupId,
                       int scale,
                       short index)
scaledGroupId - The id of the group to which the image belongs.  An invalid value will
 result in an ArrayIndexOutOfBoundsException.scale - The desired scale of the image.  An invalid value will result in an
 ArrayIndexOutOfBoundsException.index - The index of the image in that group.  An invalid value will result in an
 ArrayIndexOutOfBoundsException.