javax.rad.genui.control
Class UIChart

java.lang.Object
  extended by javax.rad.genui.UIResource<C>
      extended by javax.rad.genui.UIComponent<C>
          extended by javax.rad.genui.control.AbstractControllable<IChart>
              extended by javax.rad.genui.control.UIChart
All Implemented Interfaces:
IControl, IControllable, ITableControl, ITranslatable, IChart, IComponent, IResource, INamedObject, ITranslator

public class UIChart
extends AbstractControllable<IChart>
implements IChart

Platform and technology independent Table. It is designed for use with AWT, Swing, SWT, JSP, JSF, ... .


Field Summary
 
Fields inherited from class javax.rad.genui.UIComponent
bTranslate, lLastTranslationModified, parent, popupMenu
 
Fields inherited from class javax.rad.genui.UIResource
uiResource
 
Fields inherited from interface javax.rad.ui.control.IChart
STYLE_AREA, STYLE_BARS, STYLE_LINES, STYLE_PIE
 
Fields inherited from interface javax.rad.model.ui.IControllable
COMMAND_DELETE, COMMAND_DUPLICATE, COMMAND_EDIT, COMMAND_EXPORT, COMMAND_FIRST, COMMAND_INSERT, COMMAND_INSERT_SUB, COMMAND_LAST, COMMAND_NEXT, COMMAND_PREVIOUS, COMMAND_RESTORE, COMMAND_SEARCH
 
Constructor Summary
  UIChart()
          Creates a new instance of UIChart.
protected UIChart(IChart pChart)
          Creates a new instance of UIChart with the given chart.
  UIChart(IDataBook pDataBook)
          Creates a new instance of UIChart.
  UIChart(IDataBook pDataBook, java.lang.String pXColumnName, java.lang.String[] pYColumnNames)
          Creates a new instance of UIChart.
 
Method Summary
 void cancelEditing()
          Informs the GUI control, that the last edit should be canceled(restored) the correct value is in the DataBook.
 IDataBook getActiveDataBook()
          Gets the controllable IDataBook for this IControllable.
 int getChartStyle()
          Gets the chart style.
 IDataBook getDataBook()
          Returns the DataBook displayed by this control.
 java.lang.String getTitle()
          Gets the title.
 java.lang.String getXAxisTitle()
          Gets the x axis title.
 java.lang.String getXColumnName()
          Gets the x column name.
 java.lang.String getYAxisTitle()
          Gets the y axis title.
 java.lang.String[] getYColumnNames()
          Gets the y column names.
 void notifyRepaint()
          The control need to check if the part is visible and then repaint the part.
 void saveEditing()
          Informs the GUI control, that the last edit should be set into the IDataBook or IDataRow.
 void setChartStyle(int pChartStyle)
          Sets the chart style.
 void setDataBook(IDataBook pDataBook)
          Sets the DataBook displayed by this control.
 void setTitle(java.lang.String pTitle)
          Sets the title.
 void setXAxisTitle(java.lang.String pXAxisTitle)
          Sets the x axis title.
 void setXColumnName(java.lang.String pXColumnName)
          Sets the x column name.
 void setYAxisTitle(java.lang.String pYAxisTitle)
          Sets the y axis title.
 void setYColumnNames(java.lang.String[] pYColumnNames)
          Sets the y column names.
 void startEditing()
          Informs the GUI control, that the editor should be opened.
 void updateTranslation()
          Notification for updating the translation.
 
Methods inherited from class javax.rad.genui.control.AbstractControllable
addNotify, createCellFormatter, createNodeFormatter, doCommand, doDelete, doDuplicate, doEdit, doExport, doFirst, doInsert, doInsertSub, doLast, doNext, doNotifyController, doPrevious, doRestore, doSearch, getController, isCommandEnabled, isDeleteEnabled, isDuplicateEnabled, isEditEnabled, isExportEnabled, isFirstEnabled, isInsertEnabled, isInsertSubEnabled, isLastEnabled, isNextEnabled, isPreviousEnabled, isRestoreEnabled, isSearchEnabled, removeNotify, setController
 
Methods inherited from class javax.rad.genui.UIComponent
beforeAddNotify, capture, createComponentName, createComponentNamePrefix, debug, doEventKey, doTriggerPopMenu, equals, error, eventComponentMoved, eventComponentResized, eventFocusGained, eventFocusLost, eventKey, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getComponentUIResource, getCurrentTranslation, getCursor, getDefaultName, getEventSource, getExistingNames, getFactory, getFont, getForeground, getLocation, getLocationOffset, getLocationRelativeTo, getMaximumSize, getMinimumSize, getName, getParent, getPopupMenu, getPreferredSize, getResource, getRootName, getSize, getStyle, getTabIndex, getToolTipText, getTranslation, getUIComponent, hashCode, incrementNameIfExists, info, invokeAndWait, invokeAndWait, invokeInThread, invokeInThread, invokeLater, invokeLater, isBackgroundSet, isBeforeNotified, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isNotified, isPreferredSizeSet, isTranslationChanged, isTranslationEnabled, isVisible, requestFocus, setBackground, setBounds, setBounds, setCursor, setDefaultName, setEnabled, setEventSource, setFocusable, setFont, setForeground, setLocation, setLocation, setLocationRelativeTo, setMaximumSize, setMaximumSize, setMinimumSize, setMinimumSize, setName, setParent, setPopupMenu, setPreferredSize, setPreferredSize, setRootName, setSize, setSize, setStyle, setTabIndex, setToolTipText, setTranslation, setTranslationEnabled, setUIComponent, setVisible, translate
 
Methods inherited from class javax.rad.genui.UIResource
eventResourceChanged, eventResourceChanged, fireResourceChanged, getObject, getObjectNames, getUIResource, hasResourceHandler, putObject, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.rad.ui.control.IChart
getTranslation, setTranslation
 
Methods inherited from interface javax.rad.ui.IComponent
capture, eventComponentMoved, eventComponentResized, eventFocusGained, eventFocusLost, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getEventSource, getFactory, getFont, getForeground, getLocation, getLocationRelativeTo, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getStyle, getTabIndex, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, requestFocus, setBackground, setBounds, setCursor, setEnabled, setEventSource, setFocusable, setFont, setForeground, setLocation, setLocationRelativeTo, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setStyle, setTabIndex, setToolTipText, setVisible
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 
Methods inherited from interface javax.rad.model.ui.ITranslatable
isTranslationEnabled, setTranslationEnabled
 
Methods inherited from interface javax.rad.util.ITranslator
translate
 

Constructor Detail

UIChart

public UIChart()
Creates a new instance of UIChart.

See Also:
IChart

UIChart

protected UIChart(IChart pChart)
Creates a new instance of UIChart with the given chart.

Parameters:
pChart - the chart
See Also:
IChart

UIChart

public UIChart(IDataBook pDataBook)
Creates a new instance of UIChart.

Parameters:
pDataBook - the data book.
See Also:
setDataBook(IDataBook)

UIChart

public UIChart(IDataBook pDataBook,
               java.lang.String pXColumnName,
               java.lang.String[] pYColumnNames)
Creates a new instance of UIChart.

Parameters:
pDataBook - the data book.
pXColumnName - the X column name.
pYColumnNames - the Y column names.
See Also:
setDataBook(IDataBook), setXColumnName(String), setYColumnNames(String[])
Method Detail

getDataBook

public IDataBook getDataBook()
Returns the DataBook displayed by this control.

Specified by:
getDataBook in interface ITableControl
Returns:
the DataBook.
See Also:
ITableControl.setDataBook(javax.rad.model.IDataBook)

setDataBook

public void setDataBook(IDataBook pDataBook)
Sets the DataBook displayed by this control.

Specified by:
setDataBook in interface ITableControl
Parameters:
pDataBook - the DataBook
See Also:
ITableControl.getDataBook()

getActiveDataBook

public IDataBook getActiveDataBook()
Gets the controllable IDataBook for this IControllable. IEditorControl should return the set data row, if it is instanceof IDataBook or null otherwise. ITableControl should return the set data book. ITreeControl should return the data book of the current selected node. The controller has to be informed, If the databook changes on a focused IControllable. eg: ITreeControl node selection of a different databook. Editor or table has the focus, and a different databook is set on editor or table.

Specified by:
getActiveDataBook in interface IControllable
Returns:
the controllable IDataBook

getChartStyle

public int getChartStyle()
Gets the chart style.

Specified by:
getChartStyle in interface IChart
Returns:
the chart style.
See Also:
IChart.STYLE_AREA, IChart.STYLE_BARS, IChart.STYLE_LINES, IChart.STYLE_PIE

setChartStyle

public void setChartStyle(int pChartStyle)
Sets the chart style.

Specified by:
setChartStyle in interface IChart
Parameters:
pChartStyle - the char style.
See Also:
IChart.STYLE_AREA, IChart.STYLE_BARS, IChart.STYLE_LINES, IChart.STYLE_PIE

getTitle

public java.lang.String getTitle()
Gets the title.

Specified by:
getTitle in interface IChart
Returns:
the title.

setTitle

public void setTitle(java.lang.String pTitle)
Sets the title.

Specified by:
setTitle in interface IChart
Parameters:
pTitle - the title.

getXAxisTitle

public java.lang.String getXAxisTitle()
Gets the x axis title.

Specified by:
getXAxisTitle in interface IChart
Returns:
the x axis title.

setXAxisTitle

public void setXAxisTitle(java.lang.String pXAxisTitle)
Sets the x axis title.

Specified by:
setXAxisTitle in interface IChart
Parameters:
pXAxisTitle - the x axis title.

getYAxisTitle

public java.lang.String getYAxisTitle()
Gets the y axis title.

Specified by:
getYAxisTitle in interface IChart
Returns:
the y axis title.

setYAxisTitle

public void setYAxisTitle(java.lang.String pYAxisTitle)
Sets the y axis title.

Specified by:
setYAxisTitle in interface IChart
Parameters:
pYAxisTitle - the y axis title.

getXColumnName

public java.lang.String getXColumnName()
Gets the x column name.

Specified by:
getXColumnName in interface IChart
Returns:
the x column name.

setXColumnName

public void setXColumnName(java.lang.String pXColumnName)
Sets the x column name.

Specified by:
setXColumnName in interface IChart
Parameters:
pXColumnName - the x column name.

getYColumnNames

public java.lang.String[] getYColumnNames()
Gets the y column names.

Specified by:
getYColumnNames in interface IChart
Returns:
the y column names.

setYColumnNames

public void setYColumnNames(java.lang.String[] pYColumnNames)
Sets the y column names.

Specified by:
setYColumnNames in interface IChart
Parameters:
pYColumnNames - y column names.

notifyRepaint

public void notifyRepaint()
The control need to check if the part is visible and then repaint the part. Notify repaint is called on every change. The IControl has to catch the change, and return immediate. The change analysis and display has to be done with invoke later by the control.

Specified by:
notifyRepaint in interface IControl

startEditing

public void startEditing()
Informs the GUI control, that the editor should be opened.

Specified by:
startEditing in interface ITableControl

saveEditing

public void saveEditing()
                 throws ModelException
Informs the GUI control, that the last edit should be set into the IDataBook or IDataRow.

Specified by:
saveEditing in interface IControl
Throws:
ModelException - if the value can not be stored.

cancelEditing

public void cancelEditing()
Informs the GUI control, that the last edit should be canceled(restored) the correct value is in the DataBook.

Specified by:
cancelEditing in interface IControl

updateTranslation

public void updateTranslation()
Notification for updating the translation. This method will be called when the UIComponent will be added to a displayable containment hierarchy, when its containment hierarchy is made displayable or the translation table will be changed.

Overrides:
updateTranslation in class UIComponent<IChart>
See Also:
UIComponent.setTranslation(TranslationMap), UIComponent.addNotify()


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.