Class BasePainter<Hop extends BaseHopMeta<?>,​Part extends IBaseMeta>

    • Field Detail

      • theta

        public final double theta
      • MINI_ICON_TRIANGLE_BASE

        public static final int MINI_ICON_TRIANGLE_BASE
        See Also:
        Constant Field Values
      • drawingEditIcons

        protected boolean drawingEditIcons
      • zoomFactor

        protected double zoomFactor
      • area

        protected Point area
      • offset

        protected DPoint offset
      • iconSize

        protected int iconSize
      • miniIconSize

        protected int miniIconSize
      • gridSize

        protected int gridSize
      • selectionRectangle

        protected Rectangle selectionRectangle
      • lineWidth

        protected int lineWidth
      • magnification

        protected float magnification
      • subject

        protected Object subject
      • gc

        protected IGc gc
      • maximum

        protected Point maximum
      • showingNavigationView

        protected boolean showingNavigationView
      • screenMagnification

        protected float screenMagnification
    • Constructor Detail

      • BasePainter

        public BasePainter​(IGc gc,
                           IVariables variables,
                           Object subject,
                           Point area,
                           DPoint offset,
                           Rectangle selectionRectangle,
                           List<AreaOwner> areaOwners,
                           int iconSize,
                           int lineWidth,
                           int gridSize,
                           String noteFontName,
                           int noteFontHeight,
                           double zoomFactor,
                           boolean drawingEditIcons)
    • Method Detail

      • getStreamIconImage

        public static IGc.EImage getStreamIconImage​(StreamIcon streamIcon,
                                                    boolean enabled)
      • drawNote

        protected void drawNote​(NotePadMeta notePadMeta)
      • real2screen

        protected Point real2screen​(int x,
                                    int y)
      • magnifyPoint

        protected Point magnifyPoint​(Point p)
      • drawRect

        protected void drawRect​(Rectangle rect)
      • drawGrid

        protected void drawGrid()
      • round

        protected int round​(double value)
      • calcArrowLength

        protected int calcArrowLength()
      • getMagnification

        public float getMagnification()
        Returns:
        the magnification
      • setMagnification

        public void setMagnification​(float magnification)
        Parameters:
        magnification - the magnification to set
      • getArea

        public Point getArea()
      • setArea

        public void setArea​(Point area)
      • setAreaOwners

        public void setAreaOwners​(List<AreaOwner> areaOwners)
      • getOffset

        public DPoint getOffset()
      • setOffset

        public void setOffset​(DPoint offset)
      • getIconSize

        public int getIconSize()
      • setIconSize

        public void setIconSize​(int iconSize)
      • getGridSize

        public int getGridSize()
      • setGridSize

        public void setGridSize​(int gridSize)
      • getSelectionRectangle

        public Rectangle getSelectionRectangle()
      • setSelectionRectangle

        public void setSelectionRectangle​(Rectangle selectionRectangle)
      • getLineWidth

        public int getLineWidth()
      • setLineWidth

        public void setLineWidth​(int lineWidth)
      • getSubject

        public Object getSubject()
      • setSubject

        public void setSubject​(Object subject)
      • getGc

        public IGc getGc()
      • setGc

        public void setGc​(IGc gc)
      • getNoteFontName

        public String getNoteFontName()
      • setNoteFontName

        public void setNoteFontName​(String noteFontName)
      • getNoteFontHeight

        public int getNoteFontHeight()
      • setNoteFontHeight

        public void setNoteFontHeight​(int noteFontHeight)
      • getTheta

        public double getTheta()
      • getCandidate

        public Hop getCandidate()
      • setCandidate

        public void setCandidate​(Hop candidate)
      • getLine

        protected int[] getLine​(Part fs,
                                Part ts)
      • drawNavigationView

        protected void drawNavigationView()
        Draw a small rectangle at the bottom right of the screen which depicts the viewport as a part of the total size of the metadata graph. If the graph fits completely on the screen, the navigation view is not shown.
      • getZoomFactor

        public double getZoomFactor()
        Gets zoomFactor
        Returns:
        value of zoomFactor
      • setZoomFactor

        public void setZoomFactor​(double zoomFactor)
        Parameters:
        zoomFactor - The zoomFactor to set
      • isDrawingEditIcons

        public boolean isDrawingEditIcons()
        Gets drawingEditIcons
        Returns:
        value of drawingEditIcons
      • setDrawingEditIcons

        public void setDrawingEditIcons​(boolean drawingEditIcons)
        Parameters:
        drawingEditIcons - The drawingEditIcons to set
      • getMiniIconSize

        public int getMiniIconSize()
        Gets miniIconSize
        Returns:
        value of miniIconSize
      • setMiniIconSize

        public void setMiniIconSize​(int miniIconSize)
        Parameters:
        miniIconSize - The miniIconSize to set
      • isShowingNavigationView

        public boolean isShowingNavigationView()
        Gets showingNavigationView
        Returns:
        value of showingNavigationView
      • setShowingNavigationView

        public void setShowingNavigationView​(boolean showingNavigationView)
        Sets showingNavigationView
        Parameters:
        showingNavigationView - value of showingNavigationView
      • getMaximum

        public Point getMaximum()
        Gets maximum
        Returns:
        value of maximum
      • setMaximum

        public void setMaximum​(Point maximum)
        Sets maximum
        Parameters:
        maximum - value of maximum
      • getVariables

        public IVariables getVariables()
        Gets variables
        Returns:
        value of variables
      • setVariables

        public void setVariables​(IVariables variables)
        Sets variables
        Parameters:
        variables - value of variables
      • getScreenMagnification

        public float getScreenMagnification()
        Gets screenMagnification
        Returns:
        value of screenMagnification
      • setScreenMagnification

        public void setScreenMagnification​(float screenMagnification)
        Sets screenMagnification
        Parameters:
        screenMagnification - value of screenMagnification
      • getGraphPort

        public Rectangle getGraphPort()
        Gets graphPort
        Returns:
        value of graphPort
      • setGraphPort

        public void setGraphPort​(Rectangle graphPort)
        Sets graphPort
        Parameters:
        graphPort - value of graphPort
      • getViewPort

        public Rectangle getViewPort()
        Gets viewPort
        Returns:
        value of viewPort
      • setViewPort

        public void setViewPort​(Rectangle viewPort)
        Sets viewPort
        Parameters:
        viewPort - value of viewPort