|
|||||||||
| 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
javax.swing.text.JTextComponent
javax.swing.JTextField
fr.esrf.tangoatk.widget.util.JAutoScrolledText
public class JAutoScrolledText
Text component which supports antialiased font and autoscrolling. When autoscroll is enabled and when the text cannot be totaly displayed, JAutoScrolledText automagicaly scrolls the text from right to left.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JTextField |
|---|
javax.swing.JTextField.AccessibleJTextField |
| Nested classes/interfaces inherited from class javax.swing.text.JTextComponent |
|---|
javax.swing.text.JTextComponent.AccessibleJTextComponent, javax.swing.text.JTextComponent.KeyBinding |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
java.awt.Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static int |
CENTER_ALIGNMENT
Specifies alignment to the center of the component. |
static int |
CLASSIC_BEHAVIOR
Computes font size and return the minimun size to the layout manager |
static int |
LEFT_ALIGNMENT
Specifies alignment to the left side of the component. |
static int |
MATRIX_BEHAVIOR
Does not compute font size and let the layout manager size the component |
static int |
RIGHT_ALIGNMENT
Specifies alignment to the right side of the component. |
static int |
SCROLL_LOOP
Continuous scrolling |
static int |
SCROLL_TO_SEE_END
Scroll the text until the end of the text is reached and restart |
| Fields inherited from class javax.swing.JTextField |
|---|
notifyAction |
| Fields inherited from class javax.swing.text.JTextComponent |
|---|
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, 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, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JAutoScrolledText()
Constructs an empty text. |
|
| Method Summary | |
|---|---|
void |
addTextListener(JAutoScrolledTextListener l)
Add the specified JAutoScrolledTextListener Listeners |
int |
getHorizontalOffset()
Returns the current text horizontal offset. |
java.awt.Insets |
getMargin()
Returns the margin of this components. |
java.awt.Dimension |
getMinimumSize()
|
java.awt.Dimension |
getPreferredSize()
|
int |
getScrollingMode()
Returns the scrolling mode. |
int |
getSizingBehavior()
Gets the sizing behavior. |
int |
getSleepTime()
|
java.lang.String |
getText()
|
int |
getVerticalOffset()
Returns the current text vertical offset. |
int |
getWaitTime()
|
static void |
main(java.lang.String[] args)
Test function. |
void |
paint(java.awt.Graphics g)
Paint the component. |
void |
removeTextListener(JAutoScrolledTextListener l)
Remove the specified JAutoScrolledTextListener Listeners |
void |
setAutoScroll(int time)
Set the autoscroll mode. |
void |
setHorizontalAlignment(int a)
Sets alignment policiy (when no scroll) |
void |
setHorizontalOffset(int y)
Sets the text horizontal offset in pixel. |
void |
setMargin(java.awt.Insets i)
Sets the margin of this components. |
void |
setScrollingMode(int scrollingMode)
Set the scrolling mode. |
void |
setSizingBehavior(int s)
Sets the sizing behavior. |
void |
setSleepTime(int sleepTime)
|
void |
setText(java.lang.String txt)
Sets the text of this component. |
void |
setValueOffsets(int x,
int y)
Deprecated. |
void |
setVerticalOffset(int y)
Sets the text vertical offset in pixel. |
void |
setWaitTime(int ms)
Sets the half time between scroll animations. |
| Methods inherited from class javax.swing.JTextField |
|---|
addActionListener, configurePropertiesFromAction, createActionPropertyChangeListener, createDefaultModel, fireActionPerformed, getAccessibleContext, getAction, getActionListeners, getActions, getColumns, getColumnWidth, getHorizontalAlignment, getHorizontalVisibility, getScrollOffset, getUIClassID, isValidateRoot, paramString, postActionEvent, removeActionListener, scrollRectToVisible, setAction, setActionCommand, setColumns, setDocument, setFont, setScrollOffset |
| Methods inherited from class javax.swing.text.JTextComponent |
|---|
addCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getCaret, getCaretColor, getCaretListeners, getCaretPosition, getDisabledTextColor, getDocument, getDragEnabled, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getNavigationFilter, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getToolTipText, getUI, isEditable, loadKeymap, modelToView, moveCaretPosition, paste, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, replaceSelection, select, selectAll, setCaret, setCaretColor, setCaretPosition, setComponentOrientation, setDisabledTextColor, setDragEnabled, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setNavigationFilter, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setUI, updateUI, viewToModel, write |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static int CENTER_ALIGNMENT
public static int LEFT_ALIGNMENT
public static int RIGHT_ALIGNMENT
public static int CLASSIC_BEHAVIOR
public static int MATRIX_BEHAVIOR
public static final int SCROLL_TO_SEE_END
public static final int SCROLL_LOOP
| Constructor Detail |
|---|
public JAutoScrolledText()
| Method Detail |
|---|
public void setMargin(java.awt.Insets i)
setMargin in class javax.swing.text.JTextComponenti - Margin valuepublic java.awt.Insets getMargin()
getMargin in class javax.swing.text.JTextComponentpublic void setWaitTime(int ms)
ms - Half wait time (in millisecs)public void setSizingBehavior(int s)
s - Sizing behaviorCLASSIC_BEHAVIOR,
MATRIX_BEHAVIORpublic int getSizingBehavior()
setSizingBehavior(int)public java.awt.Dimension getPreferredSize()
getPreferredSize in class javax.swing.JTextFieldpublic java.awt.Dimension getMinimumSize()
getMinimumSize in class javax.swing.JComponentpublic void setAutoScroll(int time)
time - Scrolling refresh rate (millisec), 0 will disable scrolling.public int getSleepTime()
public void setSleepTime(int sleepTime)
public int getWaitTime()
public void setText(java.lang.String txt)
setText in class javax.swing.text.JTextComponenttxt - Text to displaypublic java.lang.String getText()
getText in class javax.swing.text.JTextComponentpublic void setVerticalOffset(int y)
y - Offset valuepublic int getVerticalOffset()
public void setHorizontalOffset(int y)
y - Offset valuepublic int getHorizontalOffset()
public void setValueOffsets(int x,
int y)
setVerticalOffset(int),
setHorizontalOffset(int)public void setHorizontalAlignment(int a)
setHorizontalAlignment in class javax.swing.JTextFielda - Alignment modeCENTER_ALIGNMENT,
RIGHT_ALIGNMENT,
LEFT_ALIGNMENTpublic void paint(java.awt.Graphics g)
paint in class javax.swing.JComponentpublic void addTextListener(JAutoScrolledTextListener l)
public void removeTextListener(JAutoScrolledTextListener l)
public int getScrollingMode()
setScrollingMode(int)public void setScrollingMode(int scrollingMode)
scrollingMode - Scrolling modeSCROLL_TO_SEE_END,
SCROLL_LOOP
public static void main(java.lang.String[] args)
throws java.lang.Exception
args - Not used
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||