|
WebCab JGraph v2.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Canvas
|
+--com.webcab.beans.newchart.Chart
This class can be used to represent discrete data sets as bar charts. The data set is read from a database. A JDBC driver is required to connect to the database. The charts are fully customizable, the component offering options for almost every visual detail.
| 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 | |
Chart()
This is the non-zero constructor required by the java.beans.Bean class in order to instantiate the bean. |
|
| Method Summary | |
void |
actionPerformed(ActionEvent e)
|
void |
componentHidden(ComponentEvent e)
|
void |
componentMoved(ComponentEvent e)
|
void |
componentResized(ComponentEvent e)
|
void |
componentShown(ComponentEvent e)
|
boolean |
getAntialias()
Returns true if antialiasing is used while drawing. |
Color |
getBackground()
Gets the background color. |
int |
getBackgroundFillDirection()
Gets the current filling direction. |
boolean |
getBaseColor()
Returns true is the base is filled with a solid color. |
int |
getBorderSpace()
Gets the current border in pixels. |
Color |
getChartBackground()
Gets the chart's backgound color. |
boolean |
getChartOutline()
Returns true if the rectangle bounding the chart is visible. |
boolean |
getChartShadow()
Returns true if the chart has shadow. |
boolean |
getDashedGrid()
Returns true if a dashed line is used while drawing the grid. |
boolean |
getDisplayGrid()
Returns true if a grid is displayed. |
boolean |
getDisplayImage()
Returns true if an image is used as background. |
boolean |
getDisplayValues()
Returns true is values are displayed. |
boolean |
getFillBottom()
Returns true if the bottom base is filled with a solid color. |
int |
getFirstColumn()
Gets the index of the first selected column within the dataset. |
Font |
getFont()
Gets the current font. |
Color |
getForeground()
Gets the current foreground color. |
Color |
getGridColor()
Gets the grid color. |
float |
getGridThickness()
Gets the space between the grid lines. |
String |
getImageUrl()
Gets the string representation of the URL where to find the background image. |
boolean |
getInteractive()
Returns true if the program responds to mouse clicks. |
String |
getJDBCDriver()
Gets the current JDBC driver. |
String |
getJDBCPassword()
Gets the current JDBC password. |
String |
getJDBCQuery()
Gets the current JDBC query. |
String |
getJDBCUrl()
Gets the current JDBC URL. |
String |
getJDBCUser()
Gets the current JDBC user. |
int |
getLastColumn()
Gets the index of the last selected column within the dataset. |
int |
getLegendPosition()
Returns the current legend alignment. |
boolean |
getLight()
Returns true if a light effect is used. |
Dimension |
getMinimumSize()
|
String |
getName()
Gets the name of the chart. |
boolean |
getShadow()
Returns true if shadows are used. |
Color |
getShadowColor()
Gets the shadow color. |
int |
getSpace()
Gets the space in pixels between sets of multiple series charts. |
int |
getTransparencyLevel()
Returns the transparency level. |
int |
getTypeOfChart()
Gets the type of chart displayed on the screen. |
int |
getTypeOfImage()
Gets the type of image alignament. |
void |
mouseClicked(MouseEvent e)
|
void |
mouseDragged(MouseEvent e)
|
void |
mouseEntered(MouseEvent e)
|
void |
mouseExited(MouseEvent e)
|
void |
mouseMoved(MouseEvent e)
|
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
void |
paint(Graphics g)
|
void |
setAntialias(boolean value)
Sets whether antialiasing is used while drawing. |
void |
setBackground(Color color)
Sets the background color. |
void |
setBackgroundFillDirection(int value)
Sets the filling direction for the background of the chart. |
void |
setBaseColor(boolean value)
Sets whether the base of the chart is filled with a solid color. |
void |
setBorderSpace(int value)
Sets the border in pixels of the chart. |
void |
setChartBackground(Color color)
Sets the chart's background color. |
void |
setChartOutline(boolean value)
Sets whether the rectangle bounding the chart is visible. |
void |
setChartShadow(boolean value)
Sets whether the whole chart has shadow. |
void |
setDashedGrid(boolean value)
Sets whether a dased line is used while drawing the grid. |
void |
setDisplayGrid(boolean value)
Sets whether a grid should be displayed. |
void |
setDisplayImage(boolean value)
Sets whether an image should be used as background. |
void |
setDisplayValues(boolean value)
Sets whether values should be displayed on the edge of the grid. |
void |
setFillBottom(boolean value)
Sets whether the bottom base of the chart is filled with a solid color. |
void |
setFirstColumn(int value)
Sets the index of the first selected column within the dataset. |
void |
setFont(Font font)
Sets the current font. |
void |
setForeground(Color color)
Sets the foreground color. |
void |
setGridColor(Color color)
Sets the grid color. |
void |
setGridThickness(float value)
Sets the space between the grid lines. |
void |
setImageUrl(String url)
Sets the string representation of the URL where the program should find an valid image to use as background. |
void |
setInteractive(boolean value)
Sets whether the program should respond to users's mouse clicks or not. |
void |
setJDBCDriver(String driver)
This method only sends a new driver to the JavaBeans component. |
void |
setJDBCPassword(String value)
This method only registers this password as the next password to use when sending the next query. |
void |
setJDBCQuery(String query)
This method tries to send the specified query to the JDBC server (as previously registered with the setJDBCDriver and the setJDBCUrl methods. |
void |
setJDBCUrl(String url)
This method only registers this url as the next url to use when sending the next query. |
void |
setJDBCUser(String value)
This method only registers this user as the next user to use when sending the next query. |
void |
setLastColumn(int value)
Sets the index of the last selected column within the dataset. |
void |
setLegendPosition(int value)
Sets the legend alignment. |
void |
setLight(boolean value)
Sets whether a light effect is used when drawing the charts that uses 3D perspective. |
void |
setName(String value)
Sets the name of the chart. |
void |
setShadow(boolean value)
Sets whether shadows should be used while drawing the chart. |
void |
setShadowColor(Color color)
Sets the shadow color. |
void |
setSpace(int value)
Sets the space in pixels between sets of multiple series charts. |
void |
setTransparencyLevel(int value)
Sets the transparency level from 0 (opaque) to 100. |
void |
setTypeOfChart(int value)
Sets the type of chart that should be displayed. |
void |
setTypeOfImage(int type)
Sets the type of alignament for the image used as background. |
void |
update(Graphics g)
|
| Methods inherited from class java.awt.Canvas |
addNotify, getAccessibleContext |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Chart()
| Method Detail |
public void setTypeOfImage(int type)
type - the type of alignament.public int getTypeOfImage()
public void setAntialias(boolean value)
value - true if antialiasing is used; false othwerwise.public boolean getAntialias()
public void setImageUrl(String url)
url - the string representation of URL where to download the image used as background.public String getImageUrl()
public void setFirstColumn(int value)
value - the index of the first selected column.public int getFirstColumn()
public void setLastColumn(int value)
value - the index of the last selected column.public int getLastColumn()
public void setName(String value)
setName in class Componentvalue - the string to use as name of the chart.public String getName()
getName in class Componentpublic void setLight(boolean value)
value - true if a light effect is used; false otherwise.public boolean getLight()
public void setBaseColor(boolean value)
value - true is the base is filled; false otherwise.public boolean getBaseColor()
public void setDashedGrid(boolean value)
value - true is a dashed line is used; false otherwise.public boolean getDashedGrid()
public void setBackgroundFillDirection(int value)
value - the direction to be used.public int getBackgroundFillDirection()
public void setDisplayImage(boolean value)
value - true if an image is used as background; false otherwise.public boolean getDisplayImage()
public void setShadow(boolean value)
value - true is shadows are used; false otherwise.public boolean getShadow()
public void setDisplayValues(boolean value)
value - true if the values are displayed; false otherwise.public boolean getDisplayValues()
public void setChartShadow(boolean value)
value - true if the chart has shadow; false otherwise.public boolean getChartShadow()
public void setChartOutline(boolean value)
value - true if the rectangle is visible; false otherwise.public boolean getChartOutline()
public void setTransparencyLevel(int value)
value - the transparency level.public int getTransparencyLevel()
public void setTypeOfChart(int value)
type - the type of chart.public int getTypeOfChart()
public void setLegendPosition(int value)
value - the legend alignment.public int getLegendPosition()
public void setSpace(int value)
value - the space in pixels.public int getSpace()
public void setBorderSpace(int value)
value - the border in pixels.public int getBorderSpace()
public void setInteractive(boolean value)
value - true if the program will respond to mouse clicks; false otherwise.public boolean getInteractive()
public void setBackground(Color color)
setBackground in class Componentpublic Color getBackground()
getBackground in class Componentpublic void setShadowColor(Color color)
public Color getShadowColor()
public void setChartBackground(Color color)
public Color getChartBackground()
public void setFont(Font font)
setFont in class Componentfont - the font to be used.public Font getFont()
getFont in class Componentpublic void setForeground(Color color)
setForeground in class Componentcolor - the color to be used.public Color getForeground()
getForeground in class Componentpublic void setGridColor(Color color)
color - the color to be used.public Color getGridColor()
public void setGridThickness(float value)
value - the space between the grid lines.public float getGridThickness()
public void setDisplayGrid(boolean value)
true - if a grid is displayed; false otherwise.public boolean getDisplayGrid()
public void setFillBottom(boolean value)
value - true if the base is filled; false otherwise.public boolean getFillBottom()
public void setJDBCDriver(String driver)
public void setJDBCUrl(String url)
setJDBCQuery method is actually run.public void setJDBCQuery(String query)
setJDBCDriver and the setJDBCUrl methods. It requires
that the query return a ResultSet containing such:
1. double (the x coordinate) 2. double (the y coordinate)
The method will not throw an exception, instead it will print its stack-trace. Please send a request if you wish it to be in any other way.
public String getJDBCDriver()
public String getJDBCUrl()
public String getJDBCQuery()
public void setJDBCUser(String value)
setJDBCQuery method is actually run.public String getJDBCUser()
public void setJDBCPassword(String value)
setJDBCQuery method is actually run.public String getJDBCPassword()
public Dimension getMinimumSize()
getMinimumSize in class Componentpublic void componentResized(ComponentEvent e)
componentResized in interface ComponentListenerpublic void componentMoved(ComponentEvent e)
componentMoved in interface ComponentListenerpublic void componentHidden(ComponentEvent e)
componentHidden in interface ComponentListenerpublic void componentShown(ComponentEvent e)
componentShown in interface ComponentListenerpublic void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerpublic void mouseDragged(MouseEvent e)
mouseDragged in interface MouseMotionListenerpublic void mouseMoved(MouseEvent e)
mouseMoved in interface MouseMotionListenerpublic void mousePressed(MouseEvent e)
mousePressed in interface MouseListenerpublic void mouseClicked(MouseEvent e)
mouseClicked in interface MouseListenerpublic void mouseReleased(MouseEvent e)
mouseReleased in interface MouseListenerpublic void mouseEntered(MouseEvent e)
mouseEntered in interface MouseListenerpublic void mouseExited(MouseEvent e)
mouseExited in interface MouseListenerpublic void paint(Graphics g)
paint in class Canvaspublic void update(Graphics g)
update in class Component
|
WebCab JGraph v2.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||