org.jplot2d.swing.interaction
Class SwingInteractiveComp
- java.lang.Object
-
- org.jplot2d.swing.interaction.SwingInteractiveComp
-
- All Implemented Interfaces:
- InteractiveComp
public class SwingInteractiveComp extends java.lang.Object implements InteractiveComp
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jplot2d.interaction.InteractiveComp
InteractiveComp.CursorStyle
-
-
Constructor Summary
Constructors Constructor and Description SwingInteractiveComp(JPlot2DComponent comp, RenderEnvironment env)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voiddrawLine(java.lang.Object g, int rgb, int x1, int y1, int x2, int y2)Draws a line with the given graphics object and rgb color.voiddrawRectangle(java.lang.Object g, int rgb, int x, int y, int width, int height)Draws a rectangle with the given graphics object and rgb color.voiddrawShape(java.lang.Object g, int rgb, java.awt.Shape shape)Draws a shape with the given graphics object and rgb color.voiddrawTooltip(java.lang.Object g, java.lang.String s, int x, int y)Draws a tooltip on the given location.InteractiveComp.CursorStylegetCursor()Gets the cursor.java.awt.PointgetCursorLocation()voidrepaint()Repaints this component.voidsetCursor(InteractiveComp.CursorStyle cursorStyle)Sets the cursor.
-
-
-
Constructor Detail
-
SwingInteractiveComp
public SwingInteractiveComp(JPlot2DComponent comp, RenderEnvironment env)
-
-
Method Detail
-
getCursorLocation
public java.awt.Point getCursorLocation()
- Specified by:
getCursorLocationin interfaceInteractiveComp
-
repaint
public void repaint()
Description copied from interface:InteractiveCompRepaints this component.- Specified by:
repaintin interfaceInteractiveComp
-
getCursor
public InteractiveComp.CursorStyle getCursor()
Description copied from interface:InteractiveCompGets the cursor.- Specified by:
getCursorin interfaceInteractiveComp
-
setCursor
public void setCursor(InteractiveComp.CursorStyle cursorStyle)
Description copied from interface:InteractiveCompSets the cursor.- Specified by:
setCursorin interfaceInteractiveComp- Parameters:
cursorStyle- the style of cursor
-
drawLine
public void drawLine(java.lang.Object g, int rgb, int x1, int y1, int x2, int y2)Description copied from interface:InteractiveCompDraws a line with the given graphics object and rgb color.- Specified by:
drawLinein interfaceInteractiveComp- Parameters:
g- the graphics objectrgb- the color value
-
drawRectangle
public void drawRectangle(java.lang.Object g, int rgb, int x, int y, int width, int height)Description copied from interface:InteractiveCompDraws a rectangle with the given graphics object and rgb color.- Specified by:
drawRectanglein interfaceInteractiveComp- Parameters:
g- the graphics objectrgb- the color value
-
drawShape
public void drawShape(java.lang.Object g, int rgb, java.awt.Shape shape)Description copied from interface:InteractiveCompDraws a shape with the given graphics object and rgb color.- Specified by:
drawShapein interfaceInteractiveComp- Parameters:
g- the graphics objectrgb- the color valueshape- the shape to draw
-
drawTooltip
public void drawTooltip(java.lang.Object g, java.lang.String s, int x, int y)Description copied from interface:InteractiveCompDraws a tooltip on the given location.- Specified by:
drawTooltipin interfaceInteractiveComp- Parameters:
g- the graphics objects- the string
-
-
DMelt 3.0 © DataMelt by jWork.ORG