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:
ComponentListener, KeyListener, MouseListener, EventListener, IControl, ITableControl, ITranslatable, IChart, IAlignmentConstants, IComponent, IContainer, IResource, INamedObject

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
eventComponentMoved, eventComponentResized, 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
 
Fields inherited from interface javax.rad.ui.IAlignmentConstants
ALIGN_BOTTOM, ALIGN_CENTER, 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.
 String getTitle()
          Gets the title.
 TranslationMap getTranslation()
          Gets the translation for this table.
 String getXAxisTitle()
          Gets the x axis title.
 String getXColumnName()
          Gets the x column name.
 String getYAxisTitle()
          Gets the y axis title.
 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(String pTitle)
          Sets the title.
 void setTranslation(TranslationMap pTranslation)
          Sets the translation for this table.
 void setXAxisTitle(String pXAxisTitle)
          Sets the x axis title.
 void setXColumnName(String pXColumnName)
          Sets the x column name.
 void setYAxisTitle(String pYAxisTitle)
          Sets the y axis title.
 void setYColumnNames(String[] pYColumnNames)
          Sets the y column names.
 void startEditing()
          Informs the GUI control, that the editor should be opened.
 
Methods inherited from class com.sibvisions.rad.ui.swing.impl.SwingComponent
capture, getToolTipText, setBackground, 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
componentHidden, componentMoved, componentResized, componentShown, createImage, eventComponentMoved, eventComponentResized, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getEventSource, getFactory, getFont, getForeground, getHorizontalAlignment, getLocation, getLocationRelativeTo, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getVerticalAlignment, 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, setVerticalAlignment, setVisible, validate
 
Methods inherited from class com.sibvisions.rad.ui.awt.impl.AwtResource
equals, getResource, hashCode, 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, eventKeyPressed, eventKeyReleased, eventKeyTyped, eventMouseClicked, eventMouseEntered, eventMouseExited, eventMousePressed, eventMouseReleased, getBackground, getBounds, getCursor, getEventSource, getFactory, getFont, getForeground, getLocation, getLocationRelativeTo, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, 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, 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.

setChartStyle

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

Specified by:
setChartStyle in interface IChart
Parameters:
pChartStyle - the char style.

getTitle

public String getTitle()
Gets the title.

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

setTitle

public void setTitle(String pTitle)
Sets the title.

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

getXAxisTitle

public String getXAxisTitle()
Gets the x axis title.

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

setXAxisTitle

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

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

getYAxisTitle

public String getYAxisTitle()
Gets the y axis title.

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

setYAxisTitle

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

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

getXColumnName

public String getXColumnName()
Gets the x column name.

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

setXColumnName

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

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

getYColumnNames

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

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

setYColumnNames

public void setYColumnNames(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.

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


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.