Class VisualArray

All Implemented Interfaces:
ComponentProducer, VisualObject

public class VisualArray extends AbstractVisualObject
The VisualArray class represents an array as a list with a text field, and add/remove buttons. When the add button is pressed, the contents of the text field are added to the list. When the remove button is pressed, the highlighted items in the list are removed. The visual array supports arrays of primitive types, and String objects.
Since:
3.1.7
Author:
Peter Hollemans
  • Constructor Details

    • VisualArray

      public VisualArray(Object array)
      Creates a new visual array object using the specified array.
  • Method Details

    • getComponent

      public Component getComponent()
      Gets the panel used to represent the array.
    • getValue

      public Object getValue()
      Gets the array value.
      Returns:
      the value that this visual object currently holds.
    • main

      public static void main(String[] argv)
      Tests this class.
      Parameters:
      argv - the array of command line parameters.