|
Ontimize 5.2072EN | |||||||||
| 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.JPanel
com.ontimize.gui.field.Chart
The component that allows to show the information in form of chart. Many types are allowed: bars, circles, etc.
JFreeChart,
Serialized Form| Nested Class Summary |
| Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
protected java.lang.Object |
attribute
A reference to attribute. |
static int |
AVG
Constant that sets the AVG operation identifier. |
protected java.awt.Paint |
backgroundPaint
|
protected java.awt.Paint |
backgroundPlotPaint
|
static int |
BAR
Constant that sets the BAR chart identifier. |
static int |
BAR_3D
Constant that sets the BAR_3D chart identifier. |
protected java.util.ResourceBundle |
bundle
|
protected javax.swing.JPanel |
chartComponentPanel
An instance of a chart component panel. |
protected IChartComponent |
chartImpl
|
protected java.lang.Object |
chartPanel
A reference for a chart panel. |
static java.lang.String |
COUNT_COLUMN
A key that allows to count the occurrences of a Xaxis value. |
protected java.lang.String |
entityName
A reference to a entity name. |
protected java.lang.String |
labelX
A reference to X label. |
protected java.lang.String |
labelY
A reference to Y label. |
static int |
LINE
Constant that sets the LINE chart identifier. |
static int |
MAX
Constant that sets the MAX operation identifier. |
static int |
MIN
Constant that sets the MIN operation identifier. |
static int |
PIE
Constant that sets the PIE chart identifier. |
static int |
PIE_3D
Constant that sets the PIE_3D chart identifier. |
protected int |
prefH
The preferred height. |
protected int |
prefW
The preferred weight. |
protected javax.swing.JScrollPane |
scroll
An instance of a scroll pane. |
static int |
STACKED_3D
Constant that sets the STACKED_3D chart identifier. |
static int |
SUM
Constant that sets the SUM operation identifier. |
protected java.lang.String |
title
|
protected int |
type
The reference to type. |
protected java.util.Hashtable |
value
A reference to value. |
protected java.util.Vector |
visibleSeries
A reference to a visible series. |
protected java.lang.String |
xAxesName
A reference to a x Axis name. |
protected java.util.Vector |
yAxesName
A reference to a y Axis name. |
| 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.ontimize.gui.field.DataComponent |
COMP_FOCUS_YELLOW, GREEN_VERY_LIGHT, LIGHT_GRAY_BLUE, LIGHT_GREYISH_BLUE, VERY_LIGHT_BLUE, VERY_LIGHT_GRAY, VERY_LIGHT_PINK, VERY_LIGHT_RED, VERY_LIGHT_SKYBLUE, VERY_LIGHT_YELLOW, VERY_LIGHT_YELLOW_2 |
| Fields inherited from interface com.ontimize.gui.field.FormComponent |
DEBUG |
| Fields inherited from interface com.ontimize.gui.i18n.Internationalization |
DEBUG_LANGUAGE |
| Fields inherited from interface com.ontimize.gui.SecureElement |
DESACTIVATE_COMPONENT_BY_PERMISSION_TIP |
| Fields inherited from interface com.ontimize.util.templates.ITemplateField |
DATA_TYPE_FIELD, DATA_TYPE_FIELD_ATTR, DATA_TYPE_IMAGE, DATA_TYPE_IMAGE_ATTR, DATA_TYPE_TABLE, DATA_TYPE_TABLE_ATTR, TEMPLATE_DATA_TYPE |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
Chart(java.util.Hashtable parameters)
Inits parameters and Container.setLayout(LayoutManager).
|
|
| Method Summary | |
boolean |
checkXYDataset(java.lang.String colX,
java.lang.String[] colY)
Checks the possible inconsistency for pairs x-y dataset values. |
java.lang.Object |
createChart()
Creates the chart in function of parameters: type, labelX, labelY, xAxesName, yAxesName, ... |
void |
createChartComponent(java.util.Hashtable parameters)
This method create the component detecting version of JfreeChart library in classpath. |
void |
deleteData()
Delete data and calls updateChart() to repaint. |
java.lang.Object |
getAttribute()
Returns an #TableAttribute whether 'entity' parameter is not null. |
java.awt.Paint |
getBackgroundPaint()
Gets the paint of background of charts. |
java.awt.Paint |
getBackgroundPlotPaint()
Gets the paint of background in plot of charts. |
java.lang.Object |
getCategoryDataset(java.lang.String colX,
java.lang.String[] colsY,
java.lang.String[] seriesNames)
Returns the CategoryDataset. |
java.lang.Object |
getCategoryDataset(java.lang.String colX,
java.lang.String[] colsY,
java.lang.String[] seriesNames,
int[] operations)
Gets the categoy dataset for chart. |
java.lang.Object |
getCategoryDataset(java.lang.String colX,
java.lang.String colY,
int operation)
Gets the category dataset. |
javax.swing.JPanel |
getChartComponentPanel()
Gets the component with chart panel is placed. |
java.lang.Object |
getChartPanel()
Returns the chart panel. |
java.lang.Object |
getConstraints(java.awt.LayoutManager parentLayout)
Returns the constraints to chart to set in the correct position in parent Container. |
java.lang.String |
getLabelComponentText()
Returns the label text component. |
java.lang.Object |
getPieDataset(java.lang.String colX,
java.lang.String colY)
Calls to getPieDataset(String, String, int) with operation = SUM.
|
java.lang.Object |
getPieDataset(java.lang.String colX,
java.lang.String colY,
int operation)
Gets the Dataset for pie charts. |
javax.swing.JScrollPane |
getScrollPane()
Gets the scroll pane where is placed. |
int |
getSQLDataType()
Returns the sql data type according to java.sql.Types
|
int |
getTemplateDataType()
Returns the data type. |
java.lang.Object |
getTemplateDataValue()
Gets the value to show in the template |
java.util.Vector |
getTextsToTranslate()
Returns all the texts in the element suitable for being translated. |
java.lang.Object |
getValue()
Gets the parameter value. |
java.lang.Object |
getXYDataset(java.lang.String colX,
java.lang.String[] colY,
java.lang.String[] series)
Matches the x-y pairs and adds to resultant XYDataSet. |
void |
init(java.util.Hashtable parameters)
This method gets the Hashtable, processes one by one its
parameters and creates the chart.
|
void |
initPermissions()
|
boolean |
isEmpty()
Checks the data existence in component. |
boolean |
isHidden()
Indicates to check the visibility condition for a component. |
boolean |
isModifiable()
Checks the modifiable condition for a component. |
boolean |
isModified()
This method should be return true when data have been modified. |
boolean |
isRequired()
Indicates the required condition for a component. |
boolean |
isRestricted()
|
void |
setBackgroundPaint(java.awt.Paint backgroundPaint)
Sets the paint of background of charts. |
void |
setBackgroundPlotPaint(java.awt.Paint backgroundPlotPaint)
Sets the paint of background in plot of charts. |
void |
setChartPreferredSize(int w,
int h)
Sets the preferred size for chart. |
void |
setComponentLocale(java.util.Locale l)
|
void |
setModifiable(boolean modifiable)
Establishes the modifiable condition for a component. |
void |
setRequired(boolean required)
Sets required a component according to condition. |
void |
setResourceBundle(java.util.ResourceBundle resources)
Sets the language resource bundle. |
void |
setSerieVisible(java.lang.String s,
boolean visible)
Adds to visibleSeries new visible values aned updates chart.
|
void |
setType(int type)
Changes the type of chart and repaints the chart. |
void |
setValue(java.lang.Object value)
Sets the value for component. |
void |
setYAxis(java.lang.String[] yAxis)
Sets the name or names in Y axis and updates the chart. |
void |
updateChart()
Repaints the chart. |
| Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, 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, firePropertyChange, fireVetoableChange, 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, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, 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, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| 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 |
| Methods inherited from interface com.ontimize.gui.field.FormComponent |
isEnabled, setEnabled, setVisible |
| Field Detail |
public static final java.lang.String COUNT_COLUMN
public static final int PIE
public static final int PIE_3D
public static final int BAR
public static final int BAR_3D
public static final int STACKED_3D
public static final int LINE
public static final int SUM
public static final int MAX
public static final int MIN
public static final int AVG
protected javax.swing.JPanel chartComponentPanel
protected javax.swing.JScrollPane scroll
protected java.lang.Object chartPanel
protected java.lang.Object attribute
protected java.lang.String xAxesName
protected java.util.Vector yAxesName
protected java.util.Vector visibleSeries
protected int type
protected java.util.Hashtable value
protected java.lang.String labelX
protected java.lang.String labelY
protected java.lang.String entityName
protected int prefW
protected int prefH
protected java.util.ResourceBundle bundle
protected java.lang.String title
protected java.awt.Paint backgroundPaint
protected java.awt.Paint backgroundPlotPaint
protected IChartComponent chartImpl
| Constructor Detail |
public Chart(java.util.Hashtable parameters)
Container.setLayout(LayoutManager).
parameters - the Hashtable with parameters| Method Detail |
public void createChartComponent(java.util.Hashtable parameters)
parameters - Hashtable with parameterspublic void setYAxis(java.lang.String[] yAxis)
setYAxis in interface IChartComponentyAxis - the String Vector with names
public void setChartPreferredSize(int w,
int h)
setChartPreferredSize in interface IChartComponentw - the widthh - the height
public void setSerieVisible(java.lang.String s,
boolean visible)
visibleSeries new visible values aned updates chart.
setSerieVisible in interface IChartComponents - the value to set visiblevisible - Indicates whether other parameter is visiblepublic java.lang.Object getChartPanel()
getChartPanel in interface IChartComponentpublic void init(java.util.Hashtable parameters)
Hashtable, processes one by one its
parameters and creates the chart.
init in interface FormComponentparameters - the Hashtable with parameters
| attribute | values | default | required | meaning |
| attr | yes | The attribute. | ||
| entity | no | The entity name. Mandatory when data are obtained from entity. | ||
| xaxis | yes | X axis name. | ||
| yaxis | yes | Y axis name. | ||
| type | line/bar/bar3d/pie/pie3d/stacked3d | line | no | The chart type |
| xlabel | no | The X axis label. | ||
| ylabel | no | The Y axis label. | ||
| width | no | Preferred width size in pixels for chart component. | ||
| height | no | Preferred height size in pixels for chart component. | ||
| title | no | Title to set. | ||
| bgpaint | A paint registered in the ColorConstants class |
no | Paint value to use in the panel when the Chart is contained in | |
| bgplotpaint | A paint registered in the ColorConstants class |
no | Paint to use in the chart plot background | |
| opaque | yes/no | yes | no | Specifies if the chart panel must be opaque or not |
public java.lang.Object getConstraints(java.awt.LayoutManager parentLayout)
getConstraints in interface FormComponentparentLayout - the parent Layout
public java.lang.Object getValue()
getValue in interface DataComponentpublic void setType(int type)
setType in interface IChartComponenttype - type of chartpublic void setValue(java.lang.Object value)
DataComponent
setValue in interface DataComponentvalue - the object with value to setpublic void updateChart()
updateChart in interface IChartComponentpublic void deleteData()
updateChart() to repaint.
deleteData in interface DataComponentpublic boolean isModified()
DataComponenttrue when data have been modified. The method
setValue() should be change this condition.
isModified in interface DataComponentpublic boolean isRequired()
DataComponent
isRequired in interface DataComponentpublic void setRequired(boolean required)
DataComponent
setRequired in interface DataComponentrequired - the required conditionpublic int getSQLDataType()
DataComponentsql data type according to java.sql.Types
getSQLDataType in interface DataComponentInteger typepublic boolean isHidden()
DataComponent
isHidden in interface DataComponentpublic void setModifiable(boolean modifiable)
DataComponentDeleteFields call.
setModifiable in interface DataComponentmodifiable - the boolean conditionpublic boolean isModifiable()
DataComponent
isModifiable in interface DataComponenttrue when component is modifiablepublic boolean isEmpty()
DataComponent
isEmpty in interface DataComponenttrue when component is emptypublic java.lang.String getLabelComponentText()
DataComponentLocale.
getLabelComponentText in interface DataComponentpublic void setComponentLocale(java.util.Locale l)
setComponentLocale in interface Internationalizationpublic void setResourceBundle(java.util.ResourceBundle resources)
Internationalization
setResourceBundle in interface Internationalizationresources - the new language bundle.public java.util.Vector getTextsToTranslate()
Internationalization
getTextsToTranslate in interface Internationalizationpublic java.lang.Object getAttribute()
getAttribute in interface IdentifiedElement#TableAttributepublic void initPermissions()
initPermissions in interface SecureElementpublic boolean isRestricted()
isRestricted in interface SecureElementpublic java.lang.Object createChart()
createChart in interface IChartComponent
public java.lang.Object getCategoryDataset(java.lang.String colX,
java.lang.String[] colsY,
java.lang.String[] seriesNames)
getCategoryDataset in interface IChartComponentgetCategoryDataset(String, String[], String[], int[])
public java.lang.Object getCategoryDataset(java.lang.String colX,
java.lang.String[] colsY,
java.lang.String[] seriesNames,
int[] operations)
getCategoryDataset in interface IChartComponentcolX - the X colcolsY - the Y colsseriesNames - the names of seriesoperations - the operations for applying to the columns. By default
(operations = null), SUM is the operation
public java.lang.Object getPieDataset(java.lang.String colX,
java.lang.String colY)
getPieDataset(String, String, int) with operation = SUM.
getPieDataset in interface IChartComponentcolX - the x columncolY - the y column
public java.lang.Object getPieDataset(java.lang.String colX,
java.lang.String colY,
int operation)
getPieDataset in interface IChartComponentcolX - the X colcolY - the Y coloperation - One of the possible operations: SUM, AVG, MAX or MIN
public java.lang.Object getCategoryDataset(java.lang.String colX,
java.lang.String colY,
int operation)
getCategoryDataset in interface IChartComponentcolX - the X colcolY - the Y coloperation - the operation
public boolean checkXYDataset(java.lang.String colX,
java.lang.String[] colY)
checkXYDataset in interface IChartComponentcolX - colY -
public java.lang.Object getXYDataset(java.lang.String colX,
java.lang.String[] colY,
java.lang.String[] series)
getXYDataset in interface IChartComponentcolX - the X colcolY - the Y colsseries - the name of series
public java.awt.Paint getBackgroundPaint()
IChartComponent
getBackgroundPaint in interface IChartComponentpublic void setBackgroundPaint(java.awt.Paint backgroundPaint)
IChartComponent
setBackgroundPaint in interface IChartComponentbackgroundPaint - the background paint to setpublic java.awt.Paint getBackgroundPlotPaint()
IChartComponent
getBackgroundPlotPaint in interface IChartComponentpublic void setBackgroundPlotPaint(java.awt.Paint backgroundPlotPaint)
IChartComponent
setBackgroundPlotPaint in interface IChartComponentpublic javax.swing.JPanel getChartComponentPanel()
IChartComponent
getChartComponentPanel in interface IChartComponentpublic javax.swing.JScrollPane getScrollPane()
IChartComponent
getScrollPane in interface IChartComponentpublic int getTemplateDataType()
ITemplateFieldITemplateField.DATA_TYPE_FIELD
ITemplateField.DATA_TYPE_IMAGE
ITemplateField.DATA_TYPE_TABLE
getTemplateDataType in interface ITemplateFieldint with the data type.public java.lang.Object getTemplateDataValue()
ITemplateField
getTemplateDataValue in interface ITemplateField
|
Ontimize | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||