com.ibm.richtext.swingui
Class JTabRuler

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--com.ibm.richtext.swingui.JTabRuler
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, MTabRulerComponent, java.io.Serializable

public final class JTabRuler
extends javax.swing.JComponent
implements MTabRulerComponent

JTabRuler is an implementation of MTabRulerComponent in a Swing component.

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent
 
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 com.ibm.richtext.awtui.MTabRulerComponent
COPYRIGHT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JTabRuler(int baseline, int origin, MTextPanel textPanel)
          Create a new TabRuler.
 
Method Summary
 java.awt.Color getBackColor()
          Return the background color of this TabRuler.
 int getFirstLineIndent()
          Return the first line indent of this TabRuler.
 int getLeadingMargin()
          Return the leading margin of this TabRuler.
 java.awt.Dimension getMinimumSize()
           
 java.awt.Dimension getPreferredSize()
           
 MTabRuler getRuler()
          Return the MTabRuler represented by this TabRuler.
 int getTrailingMargin()
          Return the trailing margin of this TabRuler.
 void listenToTextPanel(MTextPanel textPanel)
          Listen to the given MTextPanel and reflect its changes, and update its paragraph styles when TabRuler is manipulated.
 void paint(java.awt.Graphics g)
           
 void setBackColor(java.awt.Color backColor)
          Set the background color of this TabRuler.
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JTabRuler

public JTabRuler(int baseline,
                 int origin,
                 MTextPanel textPanel)
Create a new TabRuler.
Parameters:
baseline - the y-coordinate of the ruler's baseline
origin - the x-coordinate in this Component where the left margin appears
textPanel - the MTextPanel to listen to. This TabRuler will reflect the MTextPanel's paragraph styles, and update the paragraph styles when manipulated.
Method Detail

listenToTextPanel

public void listenToTextPanel(MTextPanel textPanel)
Listen to the given MTextPanel and reflect its changes, and update its paragraph styles when TabRuler is manipulated.
Specified by:
listenToTextPanel in interface MTabRulerComponent
Parameters:
textPanel - the MTextPanel to listen to

getBackColor

public java.awt.Color getBackColor()
Return the background color of this TabRuler.
Specified by:
getBackColor in interface MTabRulerComponent
Returns:
the background color of this TabRuler

setBackColor

public void setBackColor(java.awt.Color backColor)
Set the background color of this TabRuler.
Specified by:
setBackColor in interface MTabRulerComponent
Parameters:
backColor - the new background color of this TabRuler

getRuler

public MTabRuler getRuler()
Return the MTabRuler represented by this TabRuler.
Specified by:
getRuler in interface MTabRulerComponent
Returns:
the MTabRuler represented by this TabRuler

getLeadingMargin

public int getLeadingMargin()
Return the leading margin of this TabRuler.
Specified by:
getLeadingMargin in interface MTabRulerComponent
Returns:
the leading margin of this TabRuler

getFirstLineIndent

public int getFirstLineIndent()
Return the first line indent of this TabRuler.
Specified by:
getFirstLineIndent in interface MTabRulerComponent
Returns:
the first line indent of this TabRuler

getTrailingMargin

public final int getTrailingMargin()
Return the trailing margin of this TabRuler.
Specified by:
getTrailingMargin in interface MTabRulerComponent
Returns:
the trailing margin of this TabRuler

paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class javax.swing.JComponent

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class javax.swing.JComponent

getMinimumSize

public java.awt.Dimension getMinimumSize()
Overrides:
getMinimumSize in class javax.swing.JComponent


Copyright (c) 1998-2000 IBM Corporation and others.