public class Dashboard
extends javax.swing.JComponent
implements com.mindfusion.charting.components.RootControl, java.awt.print.Printable
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected static com.mindfusion.drawing.Brush |
tooltipBrush |
protected static com.mindfusion.drawing.Pen |
tooltipPen |
TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
Dashboard()
Initializes a new instance of the
Dashboard class. |
Modifier and Type | Method and Description |
---|---|
void |
addDataItemClickedListener(DataItemClickedListener listener) |
void |
associateJComponent(com.mindfusion.charting.components.Component target,
javax.swing.JComponent component)
Associates a Swing JComponent with the source
Component . |
java.awt.image.BufferedImage |
createImage()
Creates a bitmap image representing the dashboard contents.
|
java.awt.image.BufferedImage |
createImage(int pixelWidth,
int pixelHeight) |
void |
dataBind()
Binds the chart to current DataSource.
|
void |
dissociateJComponent(com.mindfusion.charting.components.Component target)
Dissociates the Swing JComponent from the source
Component . |
void |
exportImage(java.lang.String filePath) |
void |
exportImage(java.lang.String filePath,
int width,
int height)
Exports the dashboard to a bitmap image file.
|
void |
exportPdf(java.lang.String filePath)
Exports the dashboard to a Portable Document Format (PDF) file.
|
void |
exportPdf(java.lang.String filePath,
int width,
int height)
Exports the dashboard to a Portable Document Format (PDF) file.
|
protected void |
fireDataItemClicked(HitResult e) |
boolean |
getAllowZoom()
Gets a value indicating whether users are allowed to zoom into plots' data ranges.
|
java.awt.Image |
getBackgroundImage()
Gets dashboard's background image.
|
com.mindfusion.charting.components.ImageAlign |
getBackgroundImageAlign()
Gets the alignment of BackgroundImage relatively to dashboard boundaries.
|
boolean |
getBackgroundImageAutoSize()
Gets whether auto-size mode is enabled for BackgroundImage.
|
LayoutBuilder |
getLayoutBuilder()
Gets a LayoutBuilder instance that provides shortcut methods for
building fragments of dashboard's user interface.
|
com.mindfusion.charting.components.Panel |
getLayoutPanel()
Gets a
Panel containing dashboard components that should participate
in layout measurements and be arranged relatively to each other. |
com.mindfusion.charting.components.Panel |
getRootPanel()
Gets the root
Panel in the hierarchy of dashboard components. |
Theme |
getTheme()
Gets a Theme specifying appearance of dashboard elements.
|
HitResult |
hitTest(java.awt.geom.Point2D location)
Searches for a dashboard element at specified location.
|
void |
invalidate(java.awt.geom.Rectangle2D rect,
com.mindfusion.charting.components.Component panel)
Invalidates the specified region of a component.
|
void |
invalidate(java.awt.geom.Rectangle2D rect,
com.mindfusion.charting.components.Panel panel)
Implements RootControl.invalidate.
|
void |
invalidateLayout(com.mindfusion.charting.components.Component panel)
Invalidates layout of specified component.
|
void |
invalidateLayout(com.mindfusion.charting.components.Panel panel)
Implements RootControl.invalidateLayout.
|
boolean |
isAnimated() |
void |
paintComponent(java.awt.Graphics g) |
int |
print(java.awt.Graphics g,
java.awt.print.PageFormat pageFormat,
int pageIndex) |
void |
print(java.awt.print.PageFormat pageFormat,
java.lang.String printer)
Prints the current dashboard using the specified page format.
|
void |
removeDataItemClickedListener(DataItemClickedListener listener) |
void |
setAllowZoom(boolean value)
Sets a value indicating whether users are allowed to zoom into plots' data ranges.
|
void |
setBackgroundImage(java.awt.Image value)
Sets dashboard's background image.
|
void |
setBackgroundImageAlign(com.mindfusion.charting.components.ImageAlign value)
Sets the alignment of BackgroundImage relatively to dashboard boundaries.
|
void |
setBackgroundImageAutoSize(boolean value)
Sets whether auto-size mode is enabled for BackgroundImage.
|
void |
setLayoutBuilder(LayoutBuilder value)
Gets a LayoutBuilder instance that provides shortcut methods for
building fragments of dashboard's user interface.
|
void |
setLayoutPanel(com.mindfusion.charting.components.Panel value)
Gets a
Panel containing dashboard components that should participate
in layout measurements and be arranged relatively to each other. |
static void |
setLicenseKey(java.lang.String licenseKey)
Sets the component's license key string, disabling evaluation mode.
|
void |
setPrintMargins(Margins m) |
void |
setRootPanel(com.mindfusion.charting.components.Panel value)
Gets the root
Panel in the hierarchy of dashboard components. |
void |
setTheme(Theme value)
Sets a Theme specifying appearance of dashboard elements.
|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected static com.mindfusion.drawing.Brush tooltipBrush
protected static com.mindfusion.drawing.Pen tooltipPen
public Dashboard()
Dashboard
class.public com.mindfusion.charting.components.Panel getRootPanel()
Panel
in the hierarchy of dashboard components.public void setRootPanel(com.mindfusion.charting.components.Panel value)
Panel
in the hierarchy of dashboard components.public LayoutBuilder getLayoutBuilder()
public void setLayoutBuilder(LayoutBuilder value)
public com.mindfusion.charting.components.Panel getLayoutPanel()
Panel
containing dashboard components that should participate
in layout measurements and be arranged relatively to each other.public void setLayoutPanel(com.mindfusion.charting.components.Panel value)
Panel
containing dashboard components that should participate
in layout measurements and be arranged relatively to each other.public void dataBind()
public void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
public boolean isAnimated()
public void exportPdf(java.lang.String filePath)
filePath
- A string specifying file name or path.public void exportPdf(java.lang.String filePath, int width, int height)
filePath
- A string specifying file name or path.width
- The image width.height
- The image height.public java.awt.image.BufferedImage createImage()
java.awt.image.BufferedImage
object containing a representation of the dashboard.public java.awt.image.BufferedImage createImage(int pixelWidth, int pixelHeight)
createImage
in class java.awt.Component
public void exportImage(java.lang.String filePath)
public void exportImage(java.lang.String filePath, int width, int height)
filePath
- A string specifying file name or path.width
- The image width.height
- The image height.public HitResult hitTest(java.awt.geom.Point2D location)
location
- A Point2D instance specifying where to look for dashboard elements.HitResult
instance containing information about found element.public void invalidateLayout(com.mindfusion.charting.components.Panel panel)
panel
- The component to invalidate.public void invalidate(java.awt.geom.Rectangle2D rect, com.mindfusion.charting.components.Panel panel)
rect
- The area to invalidate and redraw.panel
- The reference Component.public Theme getTheme()
public void setTheme(Theme value)
public java.awt.Image getBackgroundImage()
public void setBackgroundImage(java.awt.Image value)
public boolean getBackgroundImageAutoSize()
public void setBackgroundImageAutoSize(boolean value)
public com.mindfusion.charting.components.ImageAlign getBackgroundImageAlign()
public void setBackgroundImageAlign(com.mindfusion.charting.components.ImageAlign value)
public boolean getAllowZoom()
public void setAllowZoom(boolean value)
public void setPrintMargins(Margins m)
public static void setLicenseKey(java.lang.String licenseKey)
licenseKey
- A string value containing encoded MindFusion license information.public void invalidate(java.awt.geom.Rectangle2D rect, com.mindfusion.charting.components.Component panel)
com.mindfusion.charting.components.RootControl
invalidate
in interface com.mindfusion.charting.components.RootControl
rect
- The area to invalidate and redraw.panel
- The reference Component
.public void invalidateLayout(com.mindfusion.charting.components.Component panel)
com.mindfusion.charting.components.RootControl
invalidateLayout
in interface com.mindfusion.charting.components.RootControl
panel
- The component to invalidate.public void addDataItemClickedListener(DataItemClickedListener listener)
public void removeDataItemClickedListener(DataItemClickedListener listener)
protected void fireDataItemClicked(HitResult e)
public int print(java.awt.Graphics g, java.awt.print.PageFormat pageFormat, int pageIndex) throws java.awt.print.PrinterException
print
in interface java.awt.print.Printable
java.awt.print.PrinterException
public void print(java.awt.print.PageFormat pageFormat, java.lang.String printer)
pageFormat
- The size and orientation of each page to be printed.printer
- Specifies the destination printerpublic void associateJComponent(com.mindfusion.charting.components.Component target, javax.swing.JComponent component)
com.mindfusion.charting.components.RootControl
Component
.
Causes the former to be drawn directly above the source, covering its bounds entirely.associateJComponent
in interface com.mindfusion.charting.components.RootControl
target
- The source Component
.component
- The JComponent to be associated.public void dissociateJComponent(com.mindfusion.charting.components.Component target)
com.mindfusion.charting.components.RootControl
Component
.
Does nothing if the is no JComponent currently associated.dissociateJComponent
in interface com.mindfusion.charting.components.RootControl
target
- The source Component
.