|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.didkovsky.portview.PVScrollbar
public class PVScrollbar
Our own horizontal scrollbar. This ViewFactory to build either
an AWT or Swing version .
PVScrollbarListener interface to broadcast scrollbar moves.
PVScrollbarListener's implement public void
notifyScrollbarValueChanged(PVScrollbar sb);
to be notified of the scrollbar's value changing.
Example follows. Note use of view factory components. Setting the view
factory will build this in Swing or in AWT.
| Field Summary | |
|---|---|
static int |
HORIZONTAL
unused - presently always horizontal |
static int |
VERTICAL
unused - presently always horizontal |
| Constructor Summary | |
|---|---|
PVScrollbar()
|
|
PVScrollbar(int value,
int min,
int max)
|
|
| Method Summary | |
|---|---|
void |
addKeyListener(java.awt.event.KeyListener l)
|
void |
addPVScrollbarListener(PVScrollbarListener listener)
|
void |
drawLeftArrow(java.awt.Graphics bg)
|
void |
drawRightArrow(java.awt.Graphics bg)
|
void |
drawScrollRect(java.awt.Graphics bg)
|
java.awt.Color |
getBackground()
|
java.awt.Rectangle |
getBounds()
|
java.awt.Component |
getComponent()
|
java.awt.Font |
getFont()
|
java.awt.Graphics |
getGraphics()
|
int |
getImgHeight()
|
int |
getImgWidth()
|
int |
getLineIncrement()
|
int |
getMax()
|
int |
getMin()
|
int |
getPageIncrement()
|
java.awt.Container |
getParent()
|
java.awt.Color |
getSBBackgroundColor()
|
int |
getValue()
|
boolean |
isEnabled()
|
static void |
main(java.lang.String[] args)
|
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
removeKeyListener(java.awt.event.KeyListener l)
|
void |
removePVScrollbarListener(PVScrollbarListener listener)
|
void |
repaint()
|
void |
setArrowColor(java.awt.Color c)
|
void |
setBackground(java.awt.Color color)
|
void |
setBevelColor1(java.awt.Color c)
|
void |
setBevelColor2(java.awt.Color c)
|
void |
setCanvasSize(int w,
int h)
|
void |
setEnabled(boolean b)
|
void |
setFont(java.awt.Font font)
|
void |
setLineIncrement(int v)
Set how much the value jumps when click on leftmost or rightmost arrow. |
void |
setLocation(int x,
int y)
|
void |
setMax(int max)
set the max value for this scrollbar |
void |
setMin(int min)
set the min value for this scrollbar |
void |
setPageIncrement(int v)
Set how much the value jumps when click to left or right of slider. |
void |
setScrollbarBackgroundColor(java.awt.Color c)
|
void |
setSize(java.awt.Dimension d)
|
void |
setSize(int w,
int h)
reshape size of scrollbar |
void |
setValue(int v)
|
void |
setValues(int v,
int min,
int max)
Set current value, minimum value, maximum value of scrollbar |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int HORIZONTAL
public static final int VERTICAL
| Constructor Detail |
|---|
public PVScrollbar()
public PVScrollbar(int value,
int min,
int max)
| Method Detail |
|---|
public void addPVScrollbarListener(PVScrollbarListener listener)
public void removePVScrollbarListener(PVScrollbarListener listener)
public java.awt.Component getComponent()
getComponent in interface PVComponentpublic void setArrowColor(java.awt.Color c)
public void setBevelColor1(java.awt.Color c)
public void setBevelColor2(java.awt.Color c)
public void setScrollbarBackgroundColor(java.awt.Color c)
public void setValues(int v,
int min,
int max)
public void setMin(int min)
public void setMax(int max)
public int getMin()
public int getMax()
public void setSize(int w,
int h)
public void setPageIncrement(int v)
public int getPageIncrement()
public void setLineIncrement(int v)
public int getLineIncrement()
public int getValue()
public void setValue(int v)
public void drawLeftArrow(java.awt.Graphics bg)
public void drawRightArrow(java.awt.Graphics bg)
public void drawScrollRect(java.awt.Graphics bg)
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenerpublic static void main(java.lang.String[] args)
public java.awt.Graphics getGraphics()
getGraphics in interface PVCanvaspublic void repaint()
repaint in interface PVCanvaspublic void setSize(java.awt.Dimension d)
public java.awt.Color getSBBackgroundColor()
public int getImgWidth()
public int getImgHeight()
public void setCanvasSize(int w,
int h)
setCanvasSize in interface PVCanvaspublic java.awt.Container getParent()
getParent in interface PVComponentpublic java.awt.Rectangle getBounds()
getBounds in interface PVComponent
public void setLocation(int x,
int y)
setLocation in interface PVComponentpublic void setEnabled(boolean b)
setEnabled in interface PVComponentpublic boolean isEnabled()
isEnabled in interface PVComponentpublic void addKeyListener(java.awt.event.KeyListener l)
addKeyListener in interface PVComponentpublic void removeKeyListener(java.awt.event.KeyListener l)
removeKeyListener in interface PVComponentpublic void setBackground(java.awt.Color color)
setBackground in interface PVComponentpublic java.awt.Color getBackground()
getBackground in interface PVComponentpublic void setFont(java.awt.Font font)
setFont in interface PVComponentpublic java.awt.Font getFont()
getFont in interface PVComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||