Package hec.gfx2d

Class ViewportTextComponent

All Implemented Interfaces:
G2dPointerComponent, G2dToolbarListener, ImageObserver, MenuContainer, Serializable, Accessible

public class ViewportTextComponent extends G2dComponent implements G2dPointerComponent
See Also:
  • Constructor Details

    • ViewportTextComponent

      public ViewportTextComponent()
  • Method Details

    • getFont

      public Font getFont()
      Specified by:
      getFont in interface MenuContainer
      Overrides:
      getFont in class Component
    • setFont

      public void setFont(Font f)
      Overrides:
      setFont in class JComponent
    • setText

      public void setText(String text)
    • getText

      public String getText()
    • objectPopupMenu

      public boolean objectPopupMenu(LocalPt pt, int modifiers)
      Description copied from interface: G2dPointerComponent
      Method to show a popup menu at the given point.
      Specified by:
      objectPopupMenu in interface G2dPointerComponent
      Overrides:
      objectPopupMenu in class G2dComponent
      Parameters:
      pt - the point to place the popup menu;
      modifiers - mouse modifiers that were recieved by the mouse adapter that may be usefull here.
      Returns:
      true if the object popup event was accepted and consumed otherwise false.
    • createPopupMenu

      public void createPopupMenu()
      Overrides:
      createPopupMenu in class G2dComponent
    • setMouseAdapter

      public G2dMouseAdapter setMouseAdapter(G2dMouseAdapter adapter)
      Description copied from class: G2dComponent
      Sets the mouse adapter for the component to the given mouse adapter. The component must implement the interface for that specific mouse adapter otherwise the adapter is ignored.
      Specified by:
      setMouseAdapter in interface G2dToolbarListener
      Overrides:
      setMouseAdapter in class G2dComponent
    • setMouseAdapter

      public void setMouseAdapter(String className)
      Description copied from class: G2dComponent
      Sets the mouse adapter for the component this is identified by the given String. The component must implement the interface for that specific mouse adapter otherwise the adapter is ignored.
      Specified by:
      setMouseAdapter in interface G2dToolbarListener
      Overrides:
      setMouseAdapter in class G2dComponent
    • objectSelect

      public boolean objectSelect(LocalPt pt, int modifiers)
      Description copied from interface: G2dPointerComponent
      Method called on left mouse click.
      Specified by:
      objectSelect in interface G2dPointerComponent
      Parameters:
      pt - the point to place the popup menu;
      modifiers - mouse modifiers that were recieved by the mouse adapter that may be usefull here.
      Returns:
      true if the object select event was accepted and consumed otherwise false.
    • editProperties

      public void editProperties()
      Overrides:
      editProperties in class G2dComponent
    • addPropertiesOKListener

      public void addPropertiesOKListener(ActionListener listener)