com.incrediblesoft.redjey
Class ScrollBar

java.lang.Object
  extended by com.incrediblesoft.redjey.Component
      extended by com.incrediblesoft.redjey.Container
          extended by com.incrediblesoft.redjey.ScrollBar
All Implemented Interfaces:
MouseListener

public class ScrollBar
extends Container
implements MouseListener


Field Summary
static int HORIZONTAL
          A constant that indicates a horizontal scroll bar.
static int VERTICAL
          A constant that indicates a vertical scroll bar.
 
Fields inherited from class com.incrediblesoft.redjey.Component
BOTTOM_LAYOUT, DISABLED, H_EXPAND, HCENTER_LAYOUT, HIGHLIGHTED, LEFT_LAYOUT, NORMAL, PRESSED, RIGHT_LAYOUT, TOP_LAYOUT, TOTAL_STATES, V_EXPAND, VCENTER_LAYOUT
 
Constructor Summary
ScrollBar(int orientation)
           
ScrollBar(int orientation, Component button1, Component button2, Component caretBtn, java.lang.String styleClassName)
           
ScrollBar(int orientation, java.lang.String styleClassName)
           
 
Method Summary
 int getLineIncrement()
           
 int getMaximum()
           
 java.lang.String getName()
          This method is used to retrieve the appropriate style set from a hashtable of styles
 int getValue()
           
 int getVisibleAmount()
           
 void mouseEntered(MouseEvent event)
           
 void mouseExited(MouseEvent event)
           
 void mouseMoved(MouseEvent event)
           
 void mousePressed(MouseEvent event)
           
 void mouseScrolled(MouseEvent event)
           
 void setLineIncrement(int value)
           
 void setMaximum(int maximum)
           
 void setState(int index)
          Sets component state (NORMAL, FOCUSED, DISABLED or custom one).
 void setValue(int value)
           
 void setVisibleAmount(int visibleAmount)
           
 void update()
          Updates caret position and size
 
Methods inherited from class com.incrediblesoft.redjey.Container
add, dispatchEvent, getComponent, getComponentAt, getComponentCount, getLayout, indexOf, insertAt, pack, remove, remove, removeAll, setLayout, tick
 
Methods inherited from class com.incrediblesoft.redjey.Component
addActionListener, addMouseListener, fireActionEvent, getAbsoluteRect, getAbsoluteX, getAbsoluteY, getAlignment, getBounds, getClientSize, getContentAlignment, getCurrentStyle, getHeight, getParent, getPreferredSize, getState, getStyle, getStyleClass, getWidth, getX, getY, invalidate, invalidateTree, isFocused, isHighlightable, isVisible, keyPressed, keyReleased, paint, removeActonListener, removeMouseListener, repaint, repaint, setAlignment, setBounds, setContentAlignment, setLocation, setPreferredSize, setSize, setSize, setStyle, setStyle, setStyleClass, setTag, setVisible, setX, setY, toString, validate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

HORIZONTAL

public static final int HORIZONTAL
A constant that indicates a horizontal scroll bar.

See Also:
Constant Field Values

VERTICAL

public static final int VERTICAL
A constant that indicates a vertical scroll bar.

See Also:
Constant Field Values
Constructor Detail

ScrollBar

public ScrollBar(int orientation)

ScrollBar

public ScrollBar(int orientation,
                 java.lang.String styleClassName)

ScrollBar

public ScrollBar(int orientation,
                 Component button1,
                 Component button2,
                 Component caretBtn,
                 java.lang.String styleClassName)
Method Detail

getName

public java.lang.String getName()
Description copied from class: Component
This method is used to retrieve the appropriate style set from a hashtable of styles

Overrides:
getName in class Container
Returns:
Name of component

setState

public void setState(int index)
Description copied from class: Component
Sets component state (NORMAL, FOCUSED, DISABLED or custom one). It is also changes appearance styles.

Overrides:
setState in class Component
Parameters:
index - Component state index

setValue

public void setValue(int value)

getValue

public int getValue()

setMaximum

public void setMaximum(int maximum)

getMaximum

public int getMaximum()

setVisibleAmount

public void setVisibleAmount(int visibleAmount)

getVisibleAmount

public int getVisibleAmount()

setLineIncrement

public void setLineIncrement(int value)

getLineIncrement

public int getLineIncrement()

update

public void update()
Updates caret position and size


mouseEntered

public void mouseEntered(MouseEvent event)
Specified by:
mouseEntered in interface MouseListener

mouseExited

public void mouseExited(MouseEvent event)
Specified by:
mouseExited in interface MouseListener

mouseMoved

public void mouseMoved(MouseEvent event)
Specified by:
mouseMoved in interface MouseListener

mousePressed

public void mousePressed(MouseEvent event)
Specified by:
mousePressed in interface MouseListener

mouseScrolled

public void mouseScrolled(MouseEvent event)
Specified by:
mouseScrolled in interface MouseListener