Class JDBar


public class JDBar extends JDRectangular
JDraw Bar graphic object.
  • Field Details

    • BAR_HORIZONTAL_LEFT

      public static final int BAR_HORIZONTAL_LEFT
      Horizontal bar , min at feft
      See Also:
    • BAR_HORIZONTAL_RIGHT

      public static final int BAR_HORIZONTAL_RIGHT
      Horizontal bar , min at right
      See Also:
    • BAR_VERTICAL_TOP

      public static final int BAR_VERTICAL_TOP
      Vertical bar , min at top
      See Also:
    • BAR_VERTICAL_BOTTOM

      public static final int BAR_VERTICAL_BOTTOM
      Vertical bar , min at bottom
      See Also:
  • Constructor Details

    • JDBar

      public JDBar(String objectName, int x, int y, int w, int h)
      Contructs a JDBar.
      Parameters:
      objectName - Object name
      x - Up left corner x coordinate
      y - Up left corner y coordinate
      w - Rectangle width
      h - Rectangle height
  • Method Details

    • copy

      public JDObject copy(int x, int y)
      Description copied from class: JDObject
      Returns a copy of this object at the specified location.
      Specified by:
      copy in class JDObject
      Parameters:
      x - Horizontal position of the copied object (pixel)
      y - Vertical Position of the copied object (pixel)
      Returns:
      The copy of this object.
    • isInsideObject

      public boolean isInsideObject(int x, int y)
      Overrides:
      isInsideObject in class JDObject
      Parameters:
      x - X coordinate (pixel)
      y - Y coordinate (pixel)
      Returns:
      whether the specified point is inside this object.
    • paint

      public void paint(JDrawEditor parent, Graphics g)
      Description copied from class: JDObject
      Paints this object.
      Overrides:
      paint in class JDRectangular
      Parameters:
      parent - JdrawEditor parent (Can be null except for JDSwingObject)
      g - the specified Graphics window
    • setMaximum

      public void setMaximum(double m)
      Sets the progress bar's maximum value . It is used to handle the bar position calculation.
      Parameters:
      m - Maximum value
    • getMaximum

      public double getMaximum()
      Returns:
      the progress bar's maximum value.
      See Also:
    • setMinimum

      public void setMinimum(double m)
      Sets the progress bar's minimum value . It is used to handle the bar position calculation.
      Parameters:
      m - Miniimum value
    • getMinimum

      public double getMinimum()
      Returns:
      the progress bar's maximum value.
      See Also:
    • setBarValue

      public void setBarValue(double v)
      Sets the bar value.
      Parameters:
      v - Bar value.
    • getBarValue

      public double getBarValue()
      Returns:
      the current bar value.
    • setOutLineVisible

      public void setOutLineVisible(boolean visible)
      Displays or hides the outline of the bar.
      Parameters:
      visible - True to display the outline false otherwize.
    • isOutLineVisible

      public boolean isOutLineVisible()
      Returns:
      whether the outline is visible.
    • setOrientation

      public void setOrientation(int o)
      Sets the bar orientation.
      Parameters:
      o - Orientation value
      See Also:
    • getOrientation

      public int getOrientation()
      Returns:
      the current bar orientation.
      See Also: