Class Transposer

java.lang.Object
org.eclipse.draw2d.geometry.Transposer

public class Transposer extends Object
Conditionally transposes geometrical objects based on an "enabled" flag. When enabled, the method t(Object) will transpose the passed geometrical object. Otherwise, the object will be returned without modification
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    Transposer(boolean enabled)
    Convenience constructor to initialize the "enabled" flag during creation.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Disables transposing of inputs.
    void
    Enables transposing of inputs.
    boolean
    Returns true if this Transposer is enabled.
    void
    setEnabled(boolean e)
    Sets the enabled state of this Transposer.
    Returns a new transposed Dimension of the input Dimension.
    t(Insets i)
    Returns a new transposed Insets of the input Insets.
    t(Point p)
    Returns a new transposed Point of the input Point.
    Returns a new transposed Rectangle of the input Rectangle.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Transposer

      public Transposer()
    • Transposer

      public Transposer(boolean enabled)
      Convenience constructor to initialize the "enabled" flag during creation.
      Parameters:
      enabled - {code true}, whether geometrical objects should be transposed.
      Since:
      3.13
  • Method Details

    • disable

      public void disable()
      Disables transposing of inputs.
      Since:
      2.0
    • enable

      public void enable()
      Enables transposing of inputs.
      Since:
      2.0
    • isEnabled

      public boolean isEnabled()
      Returns true if this Transposer is enabled.
      Returns:
      true if this Transposer is enabled
      Since:
      2.0
    • setEnabled

      public void setEnabled(boolean e)
      Sets the enabled state of this Transposer.
      Parameters:
      e - New enabled value
      Since:
      2.0
    • t

      public Dimension t(Dimension d)
      Returns a new transposed Dimension of the input Dimension.
      Parameters:
      d - Input dimension being transposed.
      Returns:
      The new transposed dimension.
      Since:
      2.0
    • t

      public Insets t(Insets i)
      Returns a new transposed Insets of the input Insets.
      Parameters:
      i - Insets to be transposed.
      Returns:
      The new transposed Insets.
      Since:
      2.0
    • t

      public Point t(Point p)
      Returns a new transposed Point of the input Point.
      Parameters:
      p - Point to be transposed.
      Returns:
      The new transposed Point.
      Since:
      2.0
    • t

      public Rectangle t(Rectangle r)
      Returns a new transposed Rectangle of the input Rectangle.
      Parameters:
      r - Rectangle to be transposed.
      Returns:
      The new trasnposed Rectangle.
      Since:
      2.0