Package sim.portrayal

Class SimpleInspector

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class SimpleInspector extends Inspector
A simple inspector class that looks at the "getX" and "setX" method of the object to be investigates and creates a user-friendly graphical interface with read only and read/write components of the object.

SimpleInspector automatically creates an UpdateButton and adds it to itself at position BorderLayout.NORTH whenever you set it to be non-volatile, and when you set it to be volatile, it removes the UpdateButton.

SimpleInspector automatically sets the title of the inspetor to the object name.

See Also:
  • Field Details

    • DEFAULT_MAX_PROPERTIES

      public static final int DEFAULT_MAX_PROPERTIES
      See Also:
  • Constructor Details

    • SimpleInspector

      public SimpleInspector(Properties properties, GUIState state, String name, int maxProperties)
      Creates a new SimpleInspector with the given properties, state, maximum number of properties, and "name". The name is what's shown in the labelled list of the SimpleInspector. It is not the title of the SimpleInspector (what appears in a window). For that, use setTitle.
    • SimpleInspector

      public SimpleInspector(Properties properties, GUIState state, String name)
      Creates a new SimpleInspector with the given properties, state, and "name". The name is what's shown in the labelled list of the SimpleInspector. It is not the title of the SimpleInspector (what appears in a window). For that, use setTitle.
    • SimpleInspector

      public SimpleInspector(Object object, GUIState state)
      Creates a new SimpleInspector with the given properties and state.
    • SimpleInspector

      public SimpleInspector(Object object, GUIState state, String name)
      Creates a new SimpleInspector with the given object, state, and "name". The name is what's shown in the labelled list of the SimpleInspector. It is not the title of the SimpleInspector (what appears in a window). For that, use setTitle.
    • SimpleInspector

      public SimpleInspector(Object object, GUIState state, String name, int maxProperties)
      Creates a new SimpleInspector with the given object, state, maximum number of properties, and "name". The name is what's shown in the labelled list of the SimpleInspector. It is not the title of the SimpleInspector (what appears in a window). For that, use setTitle.
  • Method Details

    • getGUIState

      public GUIState getGUIState()
    • getMaxProperties

      public int getMaxProperties()
    • updateInspector

      public void updateInspector()
      Description copied from class: Inspector
      Called by the system to inform the Inspector that it needs to update itself to reflect any changed in the underlying data.
      Specified by:
      updateInspector in class Inspector