Class Graphic2DGrid

java.lang.Object
mgui.interfaces.AbstractInterfaceObject
mgui.interfaces.graphics.Graphic2DGrid
All Implemented Interfaces:
AttributeListener, AttributeObject, InterfaceObject, NamedObject, TreeObject, CleanableObject

public class Graphic2DGrid
extends AbstractInterfaceObject
implements AttributeObject, AttributeListener
Defines a 2D grid, for display in an InterfaceGraphic2D window.
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Constructor Details

    • Graphic2DGrid

      public Graphic2DGrid()
  • Method Details

    • init

      protected void init()
    • draw2D

      public void draw2D​(java.awt.Graphics2D g, DrawingEngine de)
    • setIsVisible

      public void setIsVisible​(boolean b)
    • setIsMajor

      public void setIsMajor​(boolean b)
    • getShowLabels

      public boolean getShowLabels()
    • setShowLabels

      public void setShowLabels​(boolean b)
    • getLabelSize

      public int getLabelSize()
    • setLabelSize

      public void setLabelSize​(int b)
    • getLabelFont

      public java.awt.Font getLabelFont()
    • getLabelColour

      public java.awt.Color getLabelColour()
    • setLabelColour

      public void setLabelColour​(java.awt.Color c)
    • setMin

      public void setMin​(double min)
    • setMax

      public void setMax​(double max)
    • setSpacing

      public void setSpacing​(double s)
    • setColour

      public void setColour​(java.awt.Color c)
    • setStyle

      public void setStyle​(java.awt.Stroke s)
    • setName

      public void setName​(java.lang.String name)
      Description copied from interface: NamedObject
      Sets the name for this object.
      Specified by:
      setName in interface NamedObject
      Overrides:
      setName in class AbstractInterfaceObject
    • getName

      public java.lang.String getName()
      Description copied from interface: NamedObject
      Gets the name for this object.
      Specified by:
      getName in interface NamedObject
      Overrides:
      getName in class AbstractInterfaceObject
      Returns:
    • getIsVisible

      public boolean getIsVisible()
    • getIsMajor

      public boolean getIsMajor()
    • getMin

      public double getMin()
    • getMax

      public double getMax()
    • getSpacing

      public double getSpacing()
    • getColour

      public java.awt.Color getColour()
    • getStyle

      public java.awt.Stroke getStyle()
    • getAttribute

      public Attribute<?> getAttribute​(java.lang.String attrName)
      Description copied from interface: AttributeObject
      Returns a specific attribute for this object.
      Specified by:
      getAttribute in interface AttributeObject
      Returns:
    • getAttributeValue

      public java.lang.Object getAttributeValue​(java.lang.String name)
      Description copied from interface: AttributeObject
      Gets the value of attribute name, or null if it does not exist.
      Specified by:
      getAttributeValue in interface AttributeObject
      Parameters:
      name - Name of the attribute
      Returns:
      the value of attribute name, or null if it does not exist
    • getAttributes

      public AttributeList getAttributes()
      Description copied from interface: AttributeObject
      Returns the list of current attributes for this object.
      Specified by:
      getAttributes in interface AttributeObject
      Returns:
    • setAttribute

      public void setAttribute​(java.lang.String attrName, java.lang.Object newValue)
      Description copied from interface: AttributeObject
      Sets a value for a specific attribute.
      Specified by:
      setAttribute in interface AttributeObject
    • setAttributes

      public void setAttributes​(AttributeList thisList)
      Description copied from interface: AttributeObject
      Sets the list of attributes for this object.
      Specified by:
      setAttributes in interface AttributeObject
    • setTreeNode

      public void setTreeNode​(InterfaceTreeNode treeNode)
      Description copied from interface: TreeObject
      Sets the children for this node's InterfaceTreeNode.
      Specified by:
      setTreeNode in interface TreeObject
      Overrides:
      setTreeNode in class AbstractInterfaceObject
    • attributeUpdated

      public void attributeUpdated​(AttributeEvent e)
      Description copied from interface: AttributeListener
      Called when an Attribute's value has been updated.
      Specified by:
      attributeUpdated in interface AttributeListener
    • addDisplayListener

      public void addDisplayListener​(DisplayListener listener)
    • removeDisplayListener

      public void removeDisplayListener​(DisplayListener listener)
    • fireListeners

      protected void fireListeners()
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object