|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
com.zfqjava.swing.JRulerBar
public class JRulerBar
JRulerBar provides a component that is useful for
displaying ruler.
| Nested Class Summary | |
|---|---|
protected class |
JRulerBar.AccessibleJRulerBar
This class implements accessibility support for the JRulerBar class. |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JRulerBar()
|
|
JRulerBar(int orientation)
|
|
| Method Summary | |
|---|---|
void |
addChangeListener(ChangeListener l)
Adds a ChangeListener to the rulerBar. |
protected void |
fireStateChanged()
Send a ChangeEvent, whose source is this RulerBar, to each listener. |
AccessibleContext |
getAccessibleContext()
Gets the AccessibleContext associated with this JRulerBar. |
ChangeListener[] |
getChangeListeners()
Returns an array of all the ChangeListeners added
to this JRulerBar with addChangeListener(). |
int |
getMajorTickSpacing()
Returns the major tick spacing. |
int |
getMinorTickSpacing()
Returns the minor tick spacing. |
BoundedRangeModel |
getModel()
Returns data model that handles the rulers three fundamental properties: minimum, maximum, value. |
int |
getOrientation()
Returns the orientation. |
Dimension |
getPreferredScrollableViewportSize()
|
Dimension |
getPreferredSize()
|
int |
getScrollableBlockIncrement(Rectangle visibleRect,
int orientation,
int direction)
|
boolean |
getScrollableTracksViewportHeight()
|
boolean |
getScrollableTracksViewportWidth()
|
int |
getScrollableUnitIncrement(Rectangle visibleRect,
int orientation,
int direction)
|
int |
getTinyTickSpacing()
Returns the tiny tick spacing. |
boolean |
isLabelPainted()
Returns the major label painted. |
boolean |
isMajorTickPainted()
Returns the major tick painted. |
boolean |
isMinorTickPainted()
Returns the minor tick painted. |
boolean |
isTinyTickPainted()
Returns the tiny tick painted. |
protected void |
paintComponent(Graphics g)
|
protected String |
paramString()
Returns a string representation of this JRulerBar. |
void |
removeChangeListener(ChangeListener l)
Removes a ChangeListener from the rulerBar. |
void |
setLabelPainted(boolean labelPainted)
Sets the major label painted. |
void |
setMajorTickPainted(boolean majorTickPainted)
Sets the major tick painted. |
void |
setMajorTickSpacing(int majorTickSpacing)
Sets the major tick spacing. |
void |
setMinorTickPainted(boolean minorTickPainted)
Sets the minor tick painted. |
void |
setMinorTickSpacing(int minorTickSpacing)
Sets the minor tick spacing. |
void |
setModel(BoundedRangeModel model)
Sets the model that handles the rulers three fundamental properties: minimum, maximum, value. |
void |
setOrientation(int orientation)
Sets the orientation. |
void |
setTinyTickPainted(boolean tinyTickPainted)
Sets the tiny tick painted. |
void |
setTinyTickSpacing(int tinyTickSpacing)
Sets the tiny tick spacing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JRulerBar()
public JRulerBar(int orientation)
| Method Detail |
|---|
public BoundedRangeModel getModel()
setModel(javax.swing.BoundedRangeModel)public void setModel(BoundedRangeModel model)
getModel()public int getOrientation()
setOrientation(int)public void setOrientation(int orientation)
orientation - the orientationgetOrientation()public void setMajorTickSpacing(int majorTickSpacing)
majorTickSpacing - the spacinggetMajorTickSpacing()public int getMajorTickSpacing()
setMajorTickSpacing(int)public void setMinorTickSpacing(int minorTickSpacing)
minorTickSpacing - the spacinggetMinorTickSpacing()public int getMinorTickSpacing()
setMinorTickSpacing(int)public void setTinyTickSpacing(int tinyTickSpacing)
tinyTickSpacing - the spacinggetTinyTickSpacing()public int getTinyTickSpacing()
setTinyTickSpacing(int)public void setMajorTickPainted(boolean majorTickPainted)
majorTickPainted - the paintedisMajorTickPainted()public boolean isMajorTickPainted()
setMajorTickPainted(boolean)public void setMinorTickPainted(boolean minorTickPainted)
minorTickPainted - the paintedisMinorTickPainted()public boolean isMinorTickPainted()
setMinorTickPainted(boolean)public void setTinyTickPainted(boolean tinyTickPainted)
tinyTickPainted - the paintedisTinyTickPainted()public boolean isTinyTickPainted()
setTinyTickPainted(boolean)public void setLabelPainted(boolean labelPainted)
labelPainted - the paintedisLabelPainted()public boolean isLabelPainted()
setLabelPainted(boolean)protected void paintComponent(Graphics g)
paintComponent in class JComponentpublic Dimension getPreferredSize()
getPreferredSize in class JComponentpublic Dimension getPreferredScrollableViewportSize()
getPreferredScrollableViewportSize in interface Scrollable
public int getScrollableUnitIncrement(Rectangle visibleRect,
int orientation,
int direction)
getScrollableUnitIncrement in interface Scrollable
public int getScrollableBlockIncrement(Rectangle visibleRect,
int orientation,
int direction)
getScrollableBlockIncrement in interface Scrollablepublic boolean getScrollableTracksViewportWidth()
getScrollableTracksViewportWidth in interface Scrollablepublic boolean getScrollableTracksViewportHeight()
getScrollableTracksViewportHeight in interface Scrollablepublic void addChangeListener(ChangeListener l)
l - the ChangeListener to addfireStateChanged(),
removeChangeListener(javax.swing.event.ChangeListener)public void removeChangeListener(ChangeListener l)
l - the ChangeListener to removefireStateChanged(),
addChangeListener(javax.swing.event.ChangeListener)public ChangeListener[] getChangeListeners()
ChangeListeners added
to this JRulerBar with addChangeListener().
ChangeListeners added or an empty
array if no listeners have been addedprotected void fireStateChanged()
addChangeListener(javax.swing.event.ChangeListener),
EventListenerListprotected String paramString()
null.
paramString in class JComponentpublic AccessibleContext getAccessibleContext()
getAccessibleContext in interface AccessiblegetAccessibleContext in class JComponent
|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||