类 ChartPanel

  • 所有已实现的接口:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, IChartPanel

    public class ChartPanel
    extends javax.swing.JPanel
    implements IChartPanel
    作者:
    yaqiang
    另请参阅:
    序列化表格
    • 嵌套类概要

      • 从类继承的嵌套类/接口 javax.swing.JPanel

        javax.swing.JPanel.AccessibleJPanel
      • 从类继承的嵌套类/接口 javax.swing.JComponent

        javax.swing.JComponent.AccessibleJComponent
      • 从类继承的嵌套类/接口 java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • 从类继承的嵌套类/接口 java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • 字段概要

      • 从类继承的字段 javax.swing.JComponent

        listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
      • 从类继承的字段 java.awt.Component

        accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • 从接口继承的字段 java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      void addPointSelectedListener​(IPointSelectedListener listener)  
      void firePointSelectedEvent()  
      Chart getChart()
      Get chart
      int getFigureHeight()
      Get Figure height
      int getFigureWidth()
      Get figure width
      MouseMode getMouseMode()
      Get mouse mode
      javax.swing.JPopupMenu getPopupMenu()
      Get popup menu
      java.util.List<int[]> getSelectedPoints()
      Get selected chart points
      java.awt.image.BufferedImage getViewImage()
      Get view image
      boolean hasWebMap()
      Check if has web map layer
      void onUndoZoomClick()
      Zoom back to full extent
      void paintComponent​(java.awt.Graphics g)
      Paint component
      void paintGraphics()
      Paint graphics
      void paintGraphics​(java.awt.Graphics2D g)  
      void paintGraphics​(java.awt.Graphics2D g, int width, int height)  
      java.awt.image.BufferedImage paintViewImage()
      Paint view image
      java.awt.image.BufferedImage paintViewImage​(int dpi)
      Paint view image
      void removePointSelectedListener​(IPointSelectedListener listener)  
      void saveImage​(java.lang.String aFile)
      Save image to a picture file
      void saveImage​(java.lang.String fileName, int dpi)
      Save image
      void saveImage​(java.lang.String fileName, int dpi, int width, int height, java.lang.Integer sleep)
      Save image
      void saveImage​(java.lang.String aFile, int width, int height, java.lang.Integer sleep)
      Save image to a picture file
      void saveImage​(java.lang.String fileName, int dpi, java.lang.Integer sleep)
      Save image
      void saveImage​(java.lang.String aFile, java.lang.Integer sleep)
      Save image to a picture file
      void saveImage_bak​(java.lang.String aFile, int width, int height, java.lang.Integer sleep)
      Save image to a picture file
      boolean saveImage_Jpeg​(java.lang.String file, int dpi)  
      boolean saveImage_Jpeg​(java.lang.String file, int width, int height, int dpi)  
      void saveImage_Jpeg_old​(java.lang.String fileName, int dpi)
      Save image to Jpeg file
      Plot selPlot​(int x, int y)
      Select a plot by point
      void setChart​(Chart value)
      Set chart
      void setMouseMode​(MouseMode value)
      Set mouse mode
      • 从类继承的方法 javax.swing.JPanel

        getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
      • 从类继承的方法 javax.swing.JComponent

        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, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, 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
      • 从类继承的方法 java.awt.Container

        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
      • 从类继承的方法 java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, 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, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 构造器详细资料

      • ChartPanel

        public ChartPanel()
        Constructor
      • ChartPanel

        public ChartPanel​(Chart chart)
        Constructor
        参数:
        chart - Chart
      • ChartPanel

        public ChartPanel​(Chart chart,
                          int width,
                          int height)
        Constructor
        参数:
        chart - Chart
        width - Chart width
        height - Chart height
    • 方法详细资料

      • getChart

        public Chart getChart()
        Get chart
        返回:
        Chart
      • setChart

        public void setChart​(Chart value)
        Set chart
        参数:
        value -
      • getPopupMenu

        public javax.swing.JPopupMenu getPopupMenu()
        Get popup menu
        返回:
        Popup menu
      • getMouseMode

        public MouseMode getMouseMode()
        Get mouse mode
        返回:
        Mouse mode
      • getSelectedPoints

        public java.util.List<int[]> getSelectedPoints()
        Get selected chart points
        返回:
        Selected chart points
      • firePointSelectedEvent

        public void firePointSelectedEvent()
      • getFigureWidth

        public int getFigureWidth()
        Get figure width
        返回:
        Figure width
      • getFigureHeight

        public int getFigureHeight()
        Get Figure height
        返回:
        Figure height
      • selPlot

        public Plot selPlot​(int x,
                            int y)
        Select a plot by point
        参数:
        x - X
        y - Y
        返回:
        Selected plot
      • paintComponent

        public void paintComponent​(java.awt.Graphics g)
        Paint component
        覆盖:
        paintComponent 在类中 javax.swing.JComponent
        参数:
        g - Graphics
      • paintGraphics

        public void paintGraphics​(java.awt.Graphics2D g)
      • paintGraphics

        public void paintGraphics​(java.awt.Graphics2D g,
                                  int width,
                                  int height)
      • saveImage

        public void saveImage​(java.lang.String aFile)
        Save image to a picture file
        指定者:
        saveImage 在接口中 IChartPanel
        参数:
        aFile - File path
      • saveImage

        public void saveImage​(java.lang.String aFile,
                              java.lang.Integer sleep)
                       throws java.io.FileNotFoundException,
                              javax.print.PrintException,
                              java.io.IOException,
                              java.lang.InterruptedException
        Save image to a picture file
        参数:
        aFile - File path
        sleep - Sleep seconds for web map layer
        抛出:
        java.io.FileNotFoundException
        javax.print.PrintException
        java.lang.InterruptedException
        java.io.IOException
      • saveImage

        public void saveImage​(java.lang.String aFile,
                              int width,
                              int height,
                              java.lang.Integer sleep)
                       throws java.io.FileNotFoundException,
                              javax.print.PrintException,
                              java.io.IOException,
                              java.lang.InterruptedException
        Save image to a picture file
        参数:
        aFile - File path
        width - Width
        height - Height
        sleep - Sleep seconds for web map layer
        抛出:
        java.io.FileNotFoundException
        javax.print.PrintException
        java.lang.InterruptedException
        java.io.IOException
      • saveImage_bak

        public void saveImage_bak​(java.lang.String aFile,
                                  int width,
                                  int height,
                                  java.lang.Integer sleep)
                           throws java.io.FileNotFoundException,
                                  javax.print.PrintException,
                                  java.io.IOException,
                                  java.lang.InterruptedException
        Save image to a picture file
        参数:
        aFile - File path
        width - Width
        height - Height
        sleep - Sleep seconds for web map layer
        抛出:
        java.io.FileNotFoundException
        javax.print.PrintException
        java.lang.InterruptedException
        java.io.IOException
      • saveImage_Jpeg_old

        public void saveImage_Jpeg_old​(java.lang.String fileName,
                                       int dpi)
                                throws java.io.IOException
        Save image to Jpeg file
        参数:
        fileName - File name
        dpi - DPI
        抛出:
        java.io.IOException
      • saveImage_Jpeg

        public boolean saveImage_Jpeg​(java.lang.String file,
                                      int dpi)
      • saveImage_Jpeg

        public boolean saveImage_Jpeg​(java.lang.String file,
                                      int width,
                                      int height,
                                      int dpi)
      • saveImage

        public void saveImage​(java.lang.String fileName,
                              int dpi)
                       throws java.io.IOException,
                              java.lang.InterruptedException
        Save image
        参数:
        fileName - File name
        dpi - DPI
        抛出:
        java.io.IOException
        java.lang.InterruptedException
      • saveImage

        public void saveImage​(java.lang.String fileName,
                              int dpi,
                              java.lang.Integer sleep)
                       throws java.io.IOException,
                              java.lang.InterruptedException
        Save image
        参数:
        fileName - File name
        dpi - DPI
        sleep - Sleep seconds for web map layer
        抛出:
        java.io.IOException
        java.lang.InterruptedException
      • saveImage

        public void saveImage​(java.lang.String fileName,
                              int dpi,
                              int width,
                              int height,
                              java.lang.Integer sleep)
                       throws java.io.IOException,
                              java.lang.InterruptedException
        Save image
        参数:
        fileName - File name
        dpi - DPI
        width - Width
        height - Height
        sleep - Sleep seconds for web map layer
        抛出:
        java.io.IOException
        java.lang.InterruptedException
      • getViewImage

        public java.awt.image.BufferedImage getViewImage()
        Get view image
        返回:
        View image
      • paintViewImage

        public java.awt.image.BufferedImage paintViewImage()
        Paint view image
        返回:
        View image
      • paintViewImage

        public java.awt.image.BufferedImage paintViewImage​(int dpi)
        Paint view image
        参数:
        dpi - Image resolution
        返回:
        View image
      • hasWebMap

        public boolean hasWebMap()
        Check if has web map layer
        返回:
        Boolean