jimgpnt
Class JImagePaintObject

java.lang.Object
  extended by jimgpnt.JImagePaintObject
Direct Known Subclasses:
JImageImageObject, JImageLineObject, JImageOvalObject, JImageQuadArrowObject, JImageRectObject, JImageScribbleObject, JImageTextObject

public abstract class JImagePaintObject
extends java.lang.Object

An object used to hold infomation about something to draw on a Graphics2D object. It includes information about the color, location, antialiasing, and alpha. Subclasses get to specify a bunch of methods. See JImageLineObject and others for a concrete example.

Copyright (c) 2004 Alistair Dickie. All Rights Reserved. See alistairdickie.com for contact details See licence.txt for licence infomation


Constructor Summary
JImagePaintObject(java.awt.Color color)
           
JImagePaintObject(java.awt.Color color, java.awt.geom.Point2D location)
           
JImagePaintObject(java.awt.Color color, java.awt.geom.Point2D location, boolean antialiased)
           
JImagePaintObject(java.awt.Color color, java.awt.geom.Point2D location, boolean antialiased, float alpha)
           
 
Method Summary
abstract  void addGraphics(java.awt.Graphics2D g2)
           
 java.awt.Graphics2D addToGraphics(java.awt.Graphics2D g)
           
abstract  JImagePaintObject createCopy(int xOffset, int yOffset)
           
abstract  boolean finished(java.awt.geom.Point2D point)
           
 float getAlpha()
           
 java.awt.Color getColor()
           
 int getCurrentPointIndex()
           
abstract  java.awt.geom.Point2D[] getHighlightPoints()
           
 java.awt.geom.Point2D getLocation()
           
protected  java.awt.geom.Point2D getStartDragLoc()
           
abstract  double[] getTranslation()
           
 boolean isAntialiased()
           
 boolean isSelected()
           
 void keyPressed(java.awt.event.KeyEvent e)
           
 void setAlpha(float alpha)
           
 void setAntialiased(boolean antialiased)
           
 void setColor(java.awt.Color color)
           
 void setCurrentPointIndex(int currentPointIndex)
           
 void setLocation(java.awt.geom.Point2D location)
           
 void setSelected(boolean selected)
           
 void setStartDragLoc(java.awt.geom.Point2D point)
           
protected abstract  void setStartDragLocs()
           
abstract  void updateLocation(java.awt.geom.Point2D point)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JImagePaintObject

public JImagePaintObject(java.awt.Color color)

JImagePaintObject

public JImagePaintObject(java.awt.Color color,
                         java.awt.geom.Point2D location)

JImagePaintObject

public JImagePaintObject(java.awt.Color color,
                         java.awt.geom.Point2D location,
                         boolean antialiased)

JImagePaintObject

public JImagePaintObject(java.awt.Color color,
                         java.awt.geom.Point2D location,
                         boolean antialiased,
                         float alpha)
Method Detail

getColor

public java.awt.Color getColor()

setColor

public void setColor(java.awt.Color color)

getLocation

public java.awt.geom.Point2D getLocation()

setLocation

public void setLocation(java.awt.geom.Point2D location)

getAlpha

public float getAlpha()

setAlpha

public void setAlpha(float alpha)

isSelected

public boolean isSelected()

setSelected

public void setSelected(boolean selected)

getCurrentPointIndex

public int getCurrentPointIndex()

setCurrentPointIndex

public void setCurrentPointIndex(int currentPointIndex)

setStartDragLoc

public void setStartDragLoc(java.awt.geom.Point2D point)

getStartDragLoc

protected java.awt.geom.Point2D getStartDragLoc()

addToGraphics

public java.awt.Graphics2D addToGraphics(java.awt.Graphics2D g)

isAntialiased

public boolean isAntialiased()

setAntialiased

public void setAntialiased(boolean antialiased)

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)

setStartDragLocs

protected abstract void setStartDragLocs()

addGraphics

public abstract void addGraphics(java.awt.Graphics2D g2)

getHighlightPoints

public abstract java.awt.geom.Point2D[] getHighlightPoints()

updateLocation

public abstract void updateLocation(java.awt.geom.Point2D point)

finished

public abstract boolean finished(java.awt.geom.Point2D point)

getTranslation

public abstract double[] getTranslation()

createCopy

public abstract JImagePaintObject createCopy(int xOffset,
                                             int yOffset)


Copyright © 2004 Alistair Dickie. All Rights Reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

1. The origin of this Software must not be misrepresented; you must not claim that you wrote the original software. If you use the Software in a product, an acknowledgment in the product documentation would be appreciated but is not required.

2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original Software.

3. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Alistair Dickie - See alistairdickie.com for contact details.