Documentation of 'sgtplot.Logo' Java class
Logo
sgtplot

Class Logo

  • All Implemented Interfaces:
    java.lang.Cloneable, LayerChild, Moveable, Selectable


    public class Logo
    extends java.lang.Object
    implements java.lang.Cloneable, LayerChild, Moveable
    Logo displays an Image on its parent Layer. Logo implements the LayerChild interface.
    Since:
    1.0
    See Also:
    LayerChild
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int BOTTOM
      Align to bottom of Logo.
      static int CENTER
      Align to center of Logo.
      static int LEFT
      Align to left of Logo.
      static int MIDDLE
      Align to middle of Logo.
      static int RIGHT
      Align to right of Logo.
      static int TOP
      Align to top of Logo.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Logo()
      Default constructor.
      Logo(Point2D.Double loc, int valign, int halign)
      Create a Logo object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addPropertyChangeListener(java.beans.PropertyChangeListener l)
      Add a new PropertyChangeListener.
      LayerChild copy()
      Create of copy of Logo.
      void draw(org.freehep.graphics2d.VectorGraphics g)
      Draw the Logo.
      java.awt.Rectangle getBounds()
      Get the bounding rectangle.
      int getHAlign()
      Get horizontal alignment
      java.lang.String getId()
      Get Logo identifier
      java.net.URL getImageURL()
      Get the image URL.
      Layer getLayer()
      Get layer.
      java.awt.Point getLocation()
      Gets the location in device coordinates.
      Point2D.Double getLocationP()
      Get location of logo.
      AbstractPane getPane()
      Get AbstractPane of the LayerChild.
      int getVAlign()
      Get vertical alignment
      boolean isMoveable()
      Returns true if the current state is moveable
      boolean isSelectable()
      Returns true if the current state is selectable.
      boolean isSelected()
      Returns true if the object's selected property is set.
      boolean isVisible()
      Check if LayerChild is visible.
      void modified(java.lang.String mess)
      Used by sgtplot internally.
      void removePropertyChangeListener(java.beans.PropertyChangeListener l)
      Remove a listener.
      void setAlign(int vert, int horz)
      Set alignment.
      void setBounds(int x, int y, int width, int height)
      Set the bounds of the Logo
      Property Change: location.
      void setBounds(java.awt.Rectangle r)
      Set the bounds of the Logo
      void setHAlign(int horz)
      Set horizontal alignment
      void setId(java.lang.String id)
      Set Logo identifier.
      void setImage(java.awt.Image img)
      Set the Logo image.
      void setImageURL(java.net.URL url)
      Set the URL for the Logo image.
      void setLayer(Layer l)
      Set parent layer.
      void setLocation(java.awt.Point loc)
      Sets the location in device coordinates.
      void setLocationP(Point2D.Double loc)
      Set location of logo
      Property Change: location.
      void setMoveable(boolean moveable)
      Set the moveable property.
      void setSelectable(boolean select)
      Set the Selectable property.
      void setSelected(boolean sel)
      Sets the selected property.
      void setVAlign(int vert)
      Set vertical alignment
      void setVisible(boolean visible)
      Set visibility for a LayerChild.
      java.lang.String toString()
      Return a string that represents the LayerChild.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Logo

        public Logo()
        Default constructor. The default location for the Logo is at (0.0, 0.0) and aligned BOTTOM and LEFT.
      • Logo

        public Logo(Point2D.Double loc,
                    int valign,
                    int halign)
        Create a Logo object. The initial object will not have an associated Image until setImage or setImageURL methods have been invoked. Vertical alignments include TOP, MIDDLE, and BOTTOM. Horizontal alignments include LEFT, CENTER, and RIGHT.
        Parameters:
        loc - Location of Logo
        valign - vertical alignment
        halign - horizontal alignment
        See Also:
        setImageURL(java.net.URL), setImage(java.awt.Image), Image
    • Method Detail

      • copy

        public LayerChild copy()
        Create of copy of Logo.
        Specified by:
        copy in interface LayerChild
        Returns:
        A copy of the LayerChild.
      • setSelected

        public void setSelected(boolean sel)
        Description copied from interface: Selectable
        Sets the selected property.
        Specified by:
        setSelected in interface Selectable
        Parameters:
        sel - true if selected, false if not.
      • isSelected

        public boolean isSelected()
        Description copied from interface: Selectable
        Returns true if the object's selected property is set.
        Specified by:
        isSelected in interface Selectable
        Returns:
        true if selected, false if not.
      • setSelectable

        public void setSelectable(boolean select)
        Description copied from interface: Selectable
        Set the Selectable property.
        Specified by:
        setSelectable in interface Selectable
        Parameters:
        select - if true object is selectable
      • isSelectable

        public boolean isSelectable()
        Description copied from interface: Selectable
        Returns true if the current state is selectable.
        Specified by:
        isSelectable in interface Selectable
        Returns:
        true if selectable
      • isMoveable

        public boolean isMoveable()
        Description copied from interface: Moveable
        Returns true if the current state is moveable
        Specified by:
        isMoveable in interface Moveable
        Returns:
        true if moveable
      • setMoveable

        public void setMoveable(boolean moveable)
        Description copied from interface: Moveable
        Set the moveable property.
        Specified by:
        setMoveable in interface Moveable
      • setImageURL

        public void setImageURL(java.net.URL url)
        Set the URL for the Logo image. The URL or the image must be set.
        Parameters:
        url - image URL
        See Also:
        setImage(java.awt.Image)
      • getImageURL

        public java.net.URL getImageURL()
        Get the image URL. The URL will be null if no imageURL was specified.
        Returns:
        the imageURL
      • setImage

        public void setImage(java.awt.Image img)
        Set the Logo image. The image or the imageURL must be set.
        Parameters:
        img - Logo image
        See Also:
        setImageURL(java.net.URL)
      • setLayer

        public void setLayer(Layer l)
        Set parent layer.
        Specified by:
        setLayer in interface LayerChild
        Parameters:
        l - parent layer
      • modified

        public void modified(java.lang.String mess)
        Description copied from interface: LayerChild
        Used by sgtplot internally.
        Specified by:
        modified in interface LayerChild
      • setId

        public void setId(java.lang.String id)
        Set Logo identifier.
        Specified by:
        setId in interface LayerChild
        Parameters:
        id - logo identifier
      • getId

        public java.lang.String getId()
        Get Logo identifier
        Specified by:
        getId in interface LayerChild
        Returns:
        identifier
      • setAlign

        public void setAlign(int vert,
                             int horz)
        Set alignment.
        Parameters:
        vert - vertical alignment
        horz - horizontal alignment
      • setVAlign

        public void setVAlign(int vert)
        Set vertical alignment
        Parameters:
        vert - vertical alignment
      • setHAlign

        public void setHAlign(int horz)
        Set horizontal alignment
        Parameters:
        horz - horizontal alignment
      • getVAlign

        public int getVAlign()
        Get vertical alignment
        Returns:
        vertical alignment
      • getHAlign

        public int getHAlign()
        Get horizontal alignment
        Returns:
        horizontal alignment
      • setLocationP

        public void setLocationP(Point2D.Double loc)
        Set location of logo
        Property Change: location.
        Parameters:
        loc - logo location
      • getLocationP

        public Point2D.Double getLocationP()
        Get location of logo.
        Returns:
        Logo location
      • draw

        public void draw(org.freehep.graphics2d.VectorGraphics g)
        Draw the Logo. If the imageURL was specified the image is retrieved using the URL and MediaTracker. The image is displayed after it is loaded.
        Specified by:
        draw in interface LayerChild
        Parameters:
        g - Graphics context
      • getBounds

        public java.awt.Rectangle getBounds()
        Get the bounding rectangle.
        Specified by:
        getBounds in interface Moveable
        Specified by:
        getBounds in interface Selectable
        Returns:
        bounding rectangle
      • getLocation

        public java.awt.Point getLocation()
        Description copied from interface: Moveable
        Gets the location in device coordinates.
        Specified by:
        getLocation in interface Moveable
        Returns:
        location
      • setLocation

        public void setLocation(java.awt.Point loc)
        Description copied from interface: Moveable
        Sets the location in device coordinates.
        Specified by:
        setLocation in interface Moveable
      • setBounds

        public void setBounds(java.awt.Rectangle r)
        Set the bounds of the Logo
      • setBounds

        public void setBounds(int x,
                              int y,
                              int width,
                              int height)
        Set the bounds of the Logo
        Property Change: location.
      • toString

        public java.lang.String toString()
        Description copied from interface: LayerChild
        Return a string that represents the LayerChild.
        Specified by:
        toString in interface LayerChild
        Overrides:
        toString in class java.lang.Object
        Returns:
        Stringified LayerChild representation.
      • isVisible

        public boolean isVisible()
        Description copied from interface: LayerChild
        Check if LayerChild is visible.
        Specified by:
        isVisible in interface LayerChild
        Returns:
        true if visible
      • setVisible

        public void setVisible(boolean visible)
        Description copied from interface: LayerChild
        Set visibility for a LayerChild.
        Specified by:
        setVisible in interface LayerChild
        Parameters:
        visible - visible if true
      • addPropertyChangeListener

        public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
        Description copied from interface: Moveable
        Add a new PropertyChangeListener. Properties will include "moved". Implementation of the following two methods will normally be via the PropertyChangeSupport class.
        Specified by:
        addPropertyChangeListener in interface Moveable
      • removePropertyChangeListener

        public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
        Description copied from interface: Moveable
        Remove a listener.
        Specified by:
        removePropertyChangeListener in interface Moveable

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.