com.sibvisions.rad.ui.swing.impl.control
Class SwingChart

java.lang.Object
  extended by com.sibvisions.rad.ui.awt.impl.AwtResource<C>
      extended by com.sibvisions.rad.ui.awt.impl.AwtComponent<C>
          extended by com.sibvisions.rad.ui.awt.impl.AwtContainer<C>
              extended by com.sibvisions.rad.ui.swing.impl.SwingComponent<JVxChart>
                  extended by com.sibvisions.rad.ui.swing.impl.control.SwingChart
All Implemented Interfaces:
java.awt.event.ComponentListener, java.awt.event.FocusListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.util.EventListener, IControl, ITableControl, ITranslatable, IChart, IAlignmentConstants, IComponent, IContainer, IResource, INamedObject, ITranslator

public class SwingChart
extends SwingComponent<JVxChart>
implements IChart

The SwingChart is the IChart implementation for swing.


Field Summary
 
Fields inherited from class com.sibvisions.rad.ui.awt.impl.AwtComponent
bComponentListener, bFocusListener, bKeyListener, bMouseListener, eventComponentMoved, eventComponentResized, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, eventSource, factory, parent
 
Fields inherited from class com.sibvisions.rad.ui.awt.impl.AwtResource
resource
 
Fields inherited from interface javax.rad.ui.control.IChart
STYLE_AREA, STYLE_BARS, STYLE_LINES, STYLE_PIE
 
Fields inherited from interface javax.rad.ui.IAlignmentConstants
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_DEFAULT, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_STRETCH, ALIGN_TOP
 
Constructor Summary
SwingChart()
          Creates a new instance of SwingChart.
 
Method Summary
 void cancelEditing()
          Informs the GUI control, that the last edit should be canceled(restored) the correct value is in the DataBook.
 int getChartStyle()
          Gets the chart style.
 IDataBook getDataBook()
          Returns the DataBook displayed by this control.
 java.lang.String getTitle()
          Gets the title.
 TranslationMap getTranslation()
          Gets the translation for this table.
 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.
 boolean isTranslationEnabled()
          Gets whether the translation is en- or disabled.
 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 setTranslation(TranslationMap pTranslation)
          Sets the translation for this table.
 void setTranslationEnabled(boolean pEnabled)
          Sets the translation en- or disabled.
 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.
 java.lang.String translate(java.lang.String pText)
          Method to translate a given text.
 
Methods inherited from class com.sibvisions.rad.ui.swing.impl.SwingComponent
capture, getToolTipText, setBackground, setTabIndex, setToolTipText
 
Methods inherited from class com.sibvisions.rad.ui.awt.impl.AwtContainer
add, add, add, add, addIntern, checkAdd, getComponent, getComponentCount, getLayout, indexOf, remove, remove, removeAll, removeIntern, setLayout, setLayoutIntern
 
Methods inherited from class com.sibvisions.rad.ui.awt.impl.AwtComponent
addComponentListener, addFocusListener, addKeyListener, addMouseListener, componentHidden, componentMoved, componentResized, componentShown, createImage, createMouseEvent, equals, eventComponentMoved, eventComponentResized, eventFocusGained, eventFocusLost, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, focusGained, focusLost, getBackground, getBounds, getCursor, getEventSource, getFactory, getFont, getForeground, getHorizontalAlignment, getLocation, getLocationRelativeTo, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getStyle, getTabIndex, getVerticalAlignment, hashCode, invalidateLayout, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isVisible, keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mousePressed, mouseReleased, requestFocus, setBounds, setCursor, setEnabled, setEventSource, setFactory, setFocusable, setFont, setForeground, setHorizontalAlignment, setLocation, setLocationRelativeTo, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setStyle, setVerticalAlignment, setVisible, validate
 
Methods inherited from class com.sibvisions.rad.ui.awt.impl.AwtResource
getResource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
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
 

Constructor Detail

SwingChart

public SwingChart()
Creates a new instance of SwingChart.

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()

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

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

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.

setTranslation

public void setTranslation(TranslationMap pTranslation)
Sets the translation for this table.

Specified by:
setTranslation in interface ITranslatable
Specified by:
setTranslation in interface IChart
Parameters:
pTranslation - the translation mapping

getTranslation

public TranslationMap getTranslation()
Gets the translation for this table.

Specified by:
getTranslation in interface ITranslatable
Specified by:
getTranslation in interface IChart
Returns:
the translation mapping

setTranslationEnabled

public void setTranslationEnabled(boolean pEnabled)
Sets the translation en- or disabled.

Specified by:
setTranslationEnabled in interface ITranslatable
Parameters:
pEnabled - true to enable the translation, false to disable

isTranslationEnabled

public boolean isTranslationEnabled()
Gets whether the translation is en- or disabled.

Specified by:
isTranslationEnabled in interface ITranslatable
Returns:
true if translation is performed, false otherwise

translate

public java.lang.String translate(java.lang.String pText)
Method to translate a given text.

Specified by:
translate in interface ITranslator
Parameters:
pText - the text to translate.
Returns:
the translated text.


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.