Class TuckBox

    • Constructor Detail

      • TuckBox

        public TuckBox()
    • Method Detail

      • registerBoxSizer

        public static void registerBoxSizer​(TuckBox.BoxSizer sizer)
        Registers a new sizer, adding it to the set of standard box sizing helpers. If sizer has already been added, nothing happens. Otherwise, the new sizer is added to the set of helpers that is returned by getBoxSizers().
        Parameters:
        sizer - a sizing helper to add to the standard list of helpers
        Throws:
        java.lang.NullPointerException - if sizer is null
      • getBoxSizers

        public static TuckBox.BoxSizer[] getBoxSizers()
        Returns a copy of the current set of standard box sizers as an array.
        Returns:
        an array of the current standard box sizing helpers
      • getName

        public java.lang.String getName()
        Description copied from interface: PageItem
        Return the user-friendly short name of this item.
        Specified by:
        getName in interface PageItem
        Returns:
        a name that describes the card or its general kind
      • getHeight

        public double getHeight()
        Description copied from interface: PageItem
        Return the height of this item, in points.
        Specified by:
        getHeight in interface PageItem
        Specified by:
        getHeight in class AbstractItem
        Returns:
        the item's height
      • getWidth

        public double getWidth()
        Description copied from interface: PageItem
        Return the width of this item, in points.
        Specified by:
        getWidth in interface PageItem
        Specified by:
        getWidth in class AbstractItem
        Returns:
        the item's width
      • getThumbnailIcon

        public javax.swing.Icon getThumbnailIcon()
        Description copied from interface: PageItem
        Returns a small representative icon for this item. The icon should be ICON_SIZE pixels wide and high.
        Specified by:
        getThumbnailIcon in interface PageItem
        Specified by:
        getThumbnailIcon in class AbstractItem
      • setDimensions

        public void setDimensions​(double width,
                                  double height,
                                  double depth)
      • getDimensions

        public double[] getDimensions()
      • paint

        public void paint​(java.awt.Graphics2D g,
                          RenderTarget target,
                          double renderResolutionHint)
        Description copied from interface: PageItem
        Paint this item at its current location. The graphics context will be scaled so that 1 unit represents 1 point. The resolution hint is a suggestion as to the resolution the item should be rendered at if it must be converted to a bitmap before being drawn. It may or may not represent the actual resolution of the output target.
        Specified by:
        paint in interface PageItem
        Specified by:
        paint in class AbstractItem
        Parameters:
        g - the graphics context to paint to
        target - the type of destination being drawn to
        renderResolutionHint - a source resolution hint
      • setLineThickness

        public void setLineThickness​(float points)
      • getLineThickness

        public float getLineThickness()
      • isThumbNotched

        public boolean isThumbNotched()
      • setThumbNotched

        public void setThumbNotched​(boolean thumbNotch)
      • getInteriorFill

        public java.awt.Color getInteriorFill()
      • setInteriorFill

        public void setInteriorFill​(java.awt.Color interiorFill)
      • getExteriorFill

        public java.awt.Color getExteriorFill()
      • setExteriorFill

        public void setExteriorFill​(java.awt.Color exteriorFill)
      • getLineColor

        public java.awt.Color getLineColor()
      • setLineColour

        public void setLineColour​(java.awt.Color lineColour)
      • hasRoundedSideFlaps

        public boolean hasRoundedSideFlaps()
      • setRoundedSideFlaps

        public void setRoundedSideFlaps​(boolean roundedSideFlaps)
      • hasHingeCut

        public boolean hasHingeCut()
      • setHingeCut

        public void setHingeCut​(boolean hingeCut)
      • getFoldColour

        public java.awt.Color getFoldColour()
      • setFoldColour

        public void setFoldColour​(java.awt.Color foldColour)
      • hasFoldLines

        public boolean hasFoldLines()
      • setFoldLines

        public void setFoldLines​(boolean foldLines)
      • writeImpl

        protected void writeImpl​(java.io.ObjectOutputStream out)
                          throws java.io.IOException
        Overrides:
        writeImpl in class AbstractFlippableItem
        Throws:
        java.io.IOException
      • readImpl

        protected void readImpl​(java.io.ObjectInputStream in)
                         throws java.io.IOException,
                                java.lang.ClassNotFoundException
        Overrides:
        readImpl in class AbstractFlippableItem
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException