com.steema.teechart.editors.gallery
Class GalleryPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.steema.teechart.editors.gallery.GalleryPanel
All Implemented Interfaces:
Gallery, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class GalleryPanel
extends javax.swing.JPanel
implements Gallery

Title: GalleryPanel class

Description: An extended JPanel class to hold a Chart Series gallery.

Copyright (c) 2005-2013 by Steema Software SL. All Rights Reserved.

Company: Steema Software SL

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
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.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 com.steema.teechart.editors.gallery.GalleryPanel.GalleryChartCollection charts
          List of Charts showing at Gallery panel.
static boolean checkMaximize
          Determines if Gallery panel will show Chart axis labels or not when maximized.
static java.awt.Cursor cursorDisabled
          The mouse cursor for Series styles that are not allowed (disabled).
 boolean functionsVisible
          Determines if Gallery panel shows Functions, or only Series.
static int galleryNumCols
          The default number of Columns in Gallery panel.
static int galleryNumRows
          The default number of Rows in Gallery panel.
 java.awt.event.ActionListener onChangeChart
          Event called when a Chart is selected (clicked) at Gallery.
 java.awt.event.ActionListener onSelectedChart
          Event called when a Chart is selected and double-clicked at Gallery.
 java.awt.event.ActionListener onSubSelected
          Event called when a Series sub-style is selected at sub-Gallery.
 GalleryChart selectedChart
           
 Series selectedSeries
           
 
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
GalleryPanel()
           
 
Method Summary
protected  void addSubCharts(Series s)
           
 void createGalleryPage(java.lang.String pageName)
           
 void createGalleryPage(java.lang.String pageName, boolean functions)
           
 void createGallerySeries(java.lang.Class seriesType)
           
 IBaseChart createSubChart(java.lang.String name)
           
static java.lang.String galleryPages(int index)
           
 boolean getDisplaySub()
          The GalleryPanel will display a sub-gallery when clicking left-bottom corner small arrow when true.
 java.lang.Class getFunctionType()
          Returns currently selected Function style, or null if none.
 java.lang.Object getInitArgs()
           
 int getNumCols()
          The number of Series type columns to display in the Chart Gallery Panel.
 int getNumRows()
          The number of Series type rows to display in the Chart Gallery Panel.
 java.lang.Class getSeriesType()
           
 boolean getSmooth()
          Determines if the chart gallery will display charts in normal mode or "smooth" mode.
 int getSubIndex()
           
 boolean getView3D()
          View Series Types in Gallery Panel as 3D/2D.
protected  void processKeyEvent(java.awt.event.KeyEvent e)
           
 void resizeCharts()
           
 void setDisplaySub(boolean value)
          Sets if GalleryPanel will display a sub-gallery when clicking left-bottom corner small arrow when true.
 void setNumCols(int value)
          Sets the number of Series type columns to display in the Chart Gallery Panel.
 void setNumRows(int value)
          Sets the number of Series type rows to display in the Chart Gallery Panel.
 void setSmooth(boolean value)
          The chart gallery will display charts in "smooth" mode when true.
 void setSubSelected(Series s, int index)
           
 void setView3D(boolean value)
          View Series Types in Gallery Panel as 3D/2D.
protected  void subSelected(java.lang.Object sender)
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
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, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, 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, addInputMethodListener, 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, getInputMethodRequests, 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, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, 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

galleryNumRows

public static final int galleryNumRows
The default number of Rows in Gallery panel.

See Also:
Constant Field Values

galleryNumCols

public static final int galleryNumCols
The default number of Columns in Gallery panel.

See Also:
Constant Field Values

cursorDisabled

public static final java.awt.Cursor cursorDisabled
The mouse cursor for Series styles that are not allowed (disabled).


checkMaximize

public static final boolean checkMaximize
Determines if Gallery panel will show Chart axis labels or not when maximized.

See Also:
Constant Field Values

functionsVisible

public boolean functionsVisible
Determines if Gallery panel shows Functions, or only Series.


selectedChart

public GalleryChart selectedChart

selectedSeries

public Series selectedSeries

onSelectedChart

public java.awt.event.ActionListener onSelectedChart
Event called when a Chart is selected and double-clicked at Gallery.


onSubSelected

public java.awt.event.ActionListener onSubSelected
Event called when a Series sub-style is selected at sub-Gallery.


onChangeChart

public java.awt.event.ActionListener onChangeChart
Event called when a Chart is selected (clicked) at Gallery.


charts

public com.steema.teechart.editors.gallery.GalleryPanel.GalleryChartCollection charts
List of Charts showing at Gallery panel.

Constructor Detail

GalleryPanel

public GalleryPanel()
Method Detail

getSmooth

public boolean getSmooth()
Determines if the chart gallery will display charts in normal mode or "smooth" mode.
Smooth mode shows charts with an eye-pleasing effect.
Default value: false

Returns:
boolean

setSmooth

public void setSmooth(boolean value)
The chart gallery will display charts in "smooth" mode when true.
Default value: false

Parameters:
value - boolean

getDisplaySub

public boolean getDisplaySub()
The GalleryPanel will display a sub-gallery when clicking left-bottom corner small arrow when true.
Default value: true

Returns:
boolean

setDisplaySub

public void setDisplaySub(boolean value)
Sets if GalleryPanel will display a sub-gallery when clicking left-bottom corner small arrow when true.
Default value: true

Parameters:
value - boolean

getNumRows

public int getNumRows()
The number of Series type rows to display in the Chart Gallery Panel.
Default value: 4

Returns:
int

setNumRows

public void setNumRows(int value)
Sets the number of Series type rows to display in the Chart Gallery Panel.
Default value: 4

Parameters:
value - int

getNumCols

public int getNumCols()
The number of Series type columns to display in the Chart Gallery Panel.
Default value: 4

Returns:
int

setNumCols

public void setNumCols(int value)
Sets the number of Series type columns to display in the Chart Gallery Panel.
Default value: 4

Parameters:
value - int

getView3D

public boolean getView3D()
View Series Types in Gallery Panel as 3D/2D.
Default value: true

Returns:
boolean

setView3D

public void setView3D(boolean value)
View Series Types in Gallery Panel as 3D/2D.
Default value: true

Parameters:
value - boolean

createSubChart

public IBaseChart createSubChart(java.lang.String name)
Specified by:
createSubChart in interface Gallery

addSubCharts

protected void addSubCharts(Series s)

subSelected

protected void subSelected(java.lang.Object sender)
                    throws java.lang.IllegalAccessException,
                           java.lang.InstantiationException,
                           java.lang.NoSuchMethodException,
                           java.lang.IllegalArgumentException,
                           java.lang.reflect.InvocationTargetException
Throws:
java.lang.IllegalAccessException
java.lang.InstantiationException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException

setSubSelected

public void setSubSelected(Series s,
                           int index)

getFunctionType

public java.lang.Class getFunctionType()
Returns currently selected Function style, or null if none.

Returns:
Class

getInitArgs

public java.lang.Object getInitArgs()

getSeriesType

public java.lang.Class getSeriesType()

getSubIndex

public int getSubIndex()

resizeCharts

public void resizeCharts()

galleryPages

public static java.lang.String galleryPages(int index)

createGalleryPage

public void createGalleryPage(java.lang.String pageName)
                       throws java.lang.NoSuchMethodException,
                              java.lang.IllegalArgumentException,
                              java.lang.reflect.InvocationTargetException
Throws:
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException

createGalleryPage

public void createGalleryPage(java.lang.String pageName,
                              boolean functions)
                       throws java.lang.NoSuchMethodException,
                              java.lang.IllegalArgumentException,
                              java.lang.reflect.InvocationTargetException
Throws:
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException

createGallerySeries

public void createGallerySeries(java.lang.Class seriesType)
                         throws java.lang.NoSuchMethodException,
                                java.lang.IllegalArgumentException,
                                java.lang.reflect.InvocationTargetException
Throws:
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.reflect.InvocationTargetException

processKeyEvent

protected void processKeyEvent(java.awt.event.KeyEvent e)
Overrides:
processKeyEvent in class javax.swing.JComponent