|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.glaivestone.javax.swing.SwingServices
General-purpose utility services for Swing UI operations.
Services are invoked through SwingServices.current
.
Field Summary | |
static SwingServices |
current
|
Method Summary | |
java.awt.Rectangle |
adjustTargetHeight(java.awt.Rectangle targetRect,
int dyAbove,
int dyBelow)
Adjust the height of a target area in a view to allow additional height above or below. |
void |
applyLabelLookAndFeel(javax.swing.JTextArea aTextItem)
Make a multi-line text area have the look-and-feel of a single-line label. |
void |
applyReadOnlyLookAndFeel(javax.swing.text.JTextComponent aTextItem)
Make a text item have the look-and-feel of a read-only item. |
int |
getLineStartOffset(int offset,
javax.swing.JTextArea textComponent)
Answer the offset of the start of the line containing the specified location. |
boolean |
scrollItemIntoView(int index,
javax.swing.JList listComponent)
Scroll the item at the specified position in the list into view. |
boolean |
scrollRowIntoView(int index,
javax.swing.JTable tableComponent)
Scroll the row at the specified position in the table into view. |
boolean |
scrollRowIntoView(int index,
javax.swing.JTable tableComponent,
int rowsAbove,
int rowsBelow)
Scroll the row at the specified position in the table into view. |
boolean |
scrollSelectionIntoView(javax.swing.JList listComponent)
Scroll the selected item in the list into view. |
boolean |
scrollSelectionIntoView(javax.swing.JTable tableComponent)
Scroll the selected row in the table into view. |
boolean |
scrollTextIntoView(int offset,
javax.swing.JScrollPane textViewScroller)
Scroll the text starting at the specified offset into view |
boolean |
scrollTextIntoView(int offset,
javax.swing.JScrollPane textViewScroller,
int linesAbove,
int linesBelow)
Scroll the text starting at the specified offset into view |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static SwingServices current
Method Detail |
public java.awt.Rectangle adjustTargetHeight(java.awt.Rectangle targetRect, int dyAbove, int dyBelow)
targetRect
- The target area to adjustdyAbove
- Desired amount of additional height above the target.dyBelow
- Desired amount of additional height above the target.
public void applyLabelLookAndFeel(javax.swing.JTextArea aTextItem)
public void applyReadOnlyLookAndFeel(javax.swing.text.JTextComponent aTextItem)
public int getLineStartOffset(int offset, javax.swing.JTextArea textComponent)
Returns -1 if an invalid location in the text is specified or the position cannot be resolved.
public boolean scrollItemIntoView(int index, javax.swing.JList listComponent)
index
- Position in the list of the item that should be in viewlistComponent
- The list component
public boolean scrollRowIntoView(int index, javax.swing.JTable tableComponent)
index
- Position in the table of the row that should be in viewtableComponent
- The table component
public boolean scrollRowIntoView(int index, javax.swing.JTable tableComponent, int rowsAbove, int rowsBelow)
rowsAbove
- Number of extra rows above the location that should be left in viewrowsBelow
- Number of extra rows below the location that should be left in viewpublic boolean scrollSelectionIntoView(javax.swing.JList listComponent)
listComponent
- The list component
public boolean scrollSelectionIntoView(javax.swing.JTable tableComponent)
tableComponent
- The table component
public boolean scrollTextIntoView(int offset, javax.swing.JScrollPane textViewScroller)
Does nothing if the text is already in view or an invalid location in the text is specified.
offset
- Offset in the text that should be in viewtextViewScroller
- Scroller containing the text component
public boolean scrollTextIntoView(int offset, javax.swing.JScrollPane textViewScroller, int linesAbove, int linesBelow)
Does nothing if the text is already in view or an invalid location in the text is specified.
offset
- Offset in the text that should be in viewtextViewScroller
- Scroller containing the text componentlinesAbove
- Number of extra lines above the location that should be left in viewlinesBelow
- Number of extra lines below the location that should be left in view
|
GFL 1.1 API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |