|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--com.java4less.rchart.JiChartBean
You must use this class if you want to use RChart with zoom and scroll in a Swing application since JiChartBean is a subclass of JPanel.
The difference between JiChartBean and JChartBean is that the first implements scroll and zoom.
Example:
// create chart object ...
JChartBean jc=new JChartBean();
jc.setChart(chart);
chart.virtualHeight=800;
chart.virtualWidth=1200;
JiChartBean jic=new JiChartBean(jc,true);
YourJPanel.add("Center",jic);
Or if you want to use the chart loader:
JChartBean jc=new JChartBean();
jc.getChartLoader().loadFromFile(dataFile,true);
jc.buildChart();
jc.getChart().virtualHeight=800;
jc.getChart().virtualWidth=1200;
JiChartBean jic=new JiChartBean(jc,true);
YourJPanel.add("Center",jic);
Inner Class Summary | |
class |
JiChartBean.southPanel
|
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Field Summary | |
boolean |
allowZoom
if TRUE the +/- zoom buttons will be made visible. |
JChartBean |
chartBean
|
int |
currentZoom
|
int |
maxZoom
maximum zoom in %. |
javax.swing.JButton |
minusZoom
|
int |
minZoom
minimum zoom in %. |
javax.swing.JButton |
plusZoom
|
javax.swing.JLabel |
zoom
|
int |
zoomIncrement
zoom increment in % for the +/- buttons. |
JiChartBean.southPanel |
zoomPanel
|
Fields inherited from class javax.swing.JComponent |
TOOL_TIP_TEXT_KEY, 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 | |
JiChartBean()
|
|
JiChartBean(JChartBean jcb,
boolean aZoom)
create an interactive chart with the chart c. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
|
void |
componentHidden(java.awt.event.ComponentEvent e)
|
void |
componentMoved(java.awt.event.ComponentEvent e)
|
void |
componentResized(java.awt.event.ComponentEvent e)
|
void |
componentShown(java.awt.event.ComponentEvent e)
|
java.lang.String |
getDataFile()
chart definition file |
int |
getIncrementZoom(int m)
get zoom increment |
int |
getMaxZoom(int m)
get maximum zoom |
int |
getMinZoom(int m)
get minimum zoom |
java.lang.String |
getName()
|
java.awt.Dimension |
getPreferredSize()
preferred size |
int |
getVirtualHeight()
chart size |
int |
getVirtualWidth()
chart size |
void |
init()
you must call this method after the doLayout() method of the container where you put iChart. |
void |
setDataFile(java.lang.String d)
set chart definition file and load it automatically |
void |
setIncrementZoom(int m)
set zoom increment |
void |
setMaxZoom(int m)
set maximum zoom |
void |
setMinZoom(int m)
set minimum zoom |
void |
setParameter(java.lang.String param,
java.lang.String val)
set parameter |
void |
setVirtualHeight(int h)
chart size |
void |
setVirtualWidth(int w)
chart size |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUIClassID, updateUI |
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, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, 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, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setLayout, validate |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, contains, createImage, createImage, dispatchEvent, enable, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, 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, 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 |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public JChartBean chartBean
public boolean allowZoom
public int maxZoom
public int minZoom
public int currentZoom
public int zoomIncrement
public javax.swing.JButton plusZoom
public javax.swing.JButton minusZoom
public javax.swing.JLabel zoom
public JiChartBean.southPanel zoomPanel
Constructor Detail |
public JiChartBean()
public JiChartBean(JChartBean jcb, boolean aZoom)
Method Detail |
public void componentHidden(java.awt.event.ComponentEvent e)
componentHidden
in interface java.awt.event.ComponentListener
public void componentMoved(java.awt.event.ComponentEvent e)
componentMoved
in interface java.awt.event.ComponentListener
public void componentShown(java.awt.event.ComponentEvent e)
componentShown
in interface java.awt.event.ComponentListener
public void componentResized(java.awt.event.ComponentEvent e)
componentResized
in interface java.awt.event.ComponentListener
public void init()
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
adjustmentValueChanged
in interface java.awt.event.AdjustmentListener
public void setParameter(java.lang.String param, java.lang.String val)
public java.lang.String getName()
getName
in class java.awt.Component
public java.lang.String getDataFile()
public void setMaxZoom(int m)
public void setMinZoom(int m)
public void setIncrementZoom(int m)
public int getMaxZoom(int m)
public int getMinZoom(int m)
public int getIncrementZoom(int m)
public void setDataFile(java.lang.String d)
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class javax.swing.JComponent
public void setVirtualWidth(int w)
public void setVirtualHeight(int h)
public int getVirtualWidth()
public int getVirtualHeight()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |