JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.chart
Class ChartRegion

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--com.klg.jclass.chart.ChartRegion
All Implemented Interfaces:
Changeable, Changeable, ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
JCChartArea

public class ChartRegion
extends JComponent
implements Changeable, Serializable

A utility class used inside JClass Chart to represent a drawable region on a chart. It is used for child components.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  CellRendererPane cellRendererPane
           
protected  boolean changed
          Boolean representing the value of the Changed property.
protected  int changedFlag
           
protected  Dimension preferredSize
           
protected  boolean updateParent
          Used to turn off updates to parent in certain cases.
 
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.klg.jclass.chart.Changeable
BASIC_CHANGE_MASK, NOTIFY_AXES_RECALC, NOTIFY_AXES_REDRAW, NOTIFY_CA_RECALC, NOTIFY_CA_REDRAW, NOTIFY_LEGEND_RECALC, NOTIFY_LEGEND_REDRAW
 
Fields inherited from interface com.klg.jclass.util.Changeable
LAYOUT, NO_CHANGE, NOTIFY_PARENT_LAYOUT, RECALC, REDRAW
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ChartRegion()
          Default constructor for chart region.
ChartRegion(com.klg.jclass.chart.JCChart p)
          Constructor that connects the ChartRegion to a parent JCChart.
 
Method Summary
 CellRendererPane getCellRendererPane()
          Gets the cell renderer pane for this ChartRegion.
 boolean getChanged()
          Gets the value of the Changed property.
 boolean getChanged(int mask)
          Checks the value of the ChangedFlag property for the specified mask (see Changeable for a list of valid masks).
 Rectangle getDrawingArea()
          Gets the bounding rectangle of the component's drawing area, (its area minus the shadows and insets).
 void getDrawingArea(Rectangle rect)
          Gets the bounding rectangle of the component's drawing area, (its area minus the insets).
 Dimension getPreferredSize()
          Returns the manually set preferred size for the ChartRegion instance.
 boolean isBatched()
           
 boolean isChanged()
          Gets the value of the Changed property.
 boolean isChanged(int mask)
          Checks the value of the ChangedFlag property for the specified mask (see Changeable for a list of valid masks).
 void paintComponent(Graphics gc)
           
 void setChanged(boolean c, int cf)
          Sets the value of the Changed property and updates the parent object.
 void setChanged(boolean n, int cf, boolean updateParent)
          Sets the value of the Changed property.
 void setPreferredSize(Dimension dim)
          Sets the preferred size manually for this ChartRegion instance.
 void updateParent(int cf)
           
 
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, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, 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

updateParent

protected boolean updateParent
Used to turn off updates to parent in certain cases.


changed

protected boolean changed
Boolean representing the value of the Changed property.


changedFlag

protected int changedFlag

preferredSize

protected Dimension preferredSize

cellRendererPane

protected CellRendererPane cellRendererPane
Constructor Detail

ChartRegion

public ChartRegion()
Default constructor for chart region.


ChartRegion

public ChartRegion(com.klg.jclass.chart.JCChart p)
Constructor that connects the ChartRegion to a parent JCChart.

Parameters:
p - parent chart
Method Detail

paintComponent

public void paintComponent(Graphics gc)
Overrides:
paintComponent in class JComponent

getPreferredSize

public Dimension getPreferredSize()
Returns the manually set preferred size for the ChartRegion instance.

Overrides:
getPreferredSize in class JComponent
Returns:
manually set preferred size, or null is none manually set

setPreferredSize

public void setPreferredSize(Dimension dim)
Sets the preferred size manually for this ChartRegion instance.

Overrides:
setPreferredSize in class JComponent
Parameters:
dim - the preferred size

getDrawingArea

public Rectangle getDrawingArea()
Gets the bounding rectangle of the component's drawing area, (its area minus the shadows and insets).

Returns:
See Also:
JComponent.setBorder(javax.swing.border.Border)

getDrawingArea

public void getDrawingArea(Rectangle rect)
Gets the bounding rectangle of the component's drawing area, (its area minus the insets).

Parameters:
rect -
See Also:
JComponent.setBorder(javax.swing.border.Border)

getCellRendererPane

public CellRendererPane getCellRendererPane()
Gets the cell renderer pane for this ChartRegion. Used to render HTML encoded text with a JLabel.

Returns:

getChanged

public boolean getChanged()
Gets the value of the Changed property. The Changed property determines whether the object needs to be recalculated.

Specified by:
getChanged in interface Changeable
Returns:
true if the object has been changed and needs recalculation; false otherwise

getChanged

public boolean getChanged(int mask)
Checks the value of the ChangedFlag property for the specified mask (see Changeable for a list of valid masks). The ChangedFlag property determines the action the object needs to take in regards to the current change.

Specified by:
getChanged in interface Changeable
Parameters:
mask -
Returns:
true if the specified mask exists in the ChangedFlag property; false otherwise

isChanged

public final boolean isChanged()
Gets the value of the Changed property. The Changed property determines whether the object needs to be recalculated.

Specified by:
isChanged in interface Changeable
Returns:
true if the object has been changed and needs recalculation; false otherwise

isChanged

public final boolean isChanged(int mask)
Checks the value of the ChangedFlag property for the specified mask (see Changeable for a list of valid masks). The ChangedFlag property determines the action the object needs to take in regards to the current change.

Specified by:
isChanged in interface Changeable
Parameters:
mask -
Returns:
true if the specified mask exists in the ChangedFlag property; false otherwise

setChanged

public void setChanged(boolean c,
                       int cf)
Sets the value of the Changed property and updates the parent object. The Changed property determines whether the object needs to be recalculated.

Specified by:
setChanged in interface Changeable
Parameters:
c - new value for Changed
cf -

setChanged

public void setChanged(boolean n,
                       int cf,
                       boolean updateParent)
Sets the value of the Changed property. The Changed property determines whether the object needs to be recalculated.

Specified by:
setChanged in interface Changeable
Parameters:
n - new value for Changed
updateParent - if true, the parent is updated; otherwise, the parent is not updated (the "update" semantics are up to the implementor)
cf -

updateParent

public void updateParent(int cf)

isBatched

public boolean isBatched()
Specified by:
isBatched in interface Changeable

Copyright © 2004 Quest Software Inc..
All rights reserved.