net.sf.latexdraw.glib.handlers
Interface IHandler

All Superinterfaces:
Pickable
All Known Implementing Classes:
ArcAngleHandler, CtrlPointHandler, Handler, MovePtHandler, RotationHandler, ScaleHandler

public interface IHandler
extends Pickable

This interface defines a handler.

This file is part of LaTeXDraw
Copyright (c) 2005-2012 Arnaud BLOUIN

LaTeXDraw is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

LaTeXDraw is distributed without any warranty; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

08/29/11

Version:
3.0
Author:
Arnaud BLOUIN

Field Summary
static int DEFAULT_SIZE
          The default size of a handler.
 
Method Summary
 IPoint getCentre()
           
 java.awt.Color getColour()
           
 int getOpacity()
           
 double getSize()
           
 double getX()
           
 double getY()
           
 void paint(java.awt.Graphics2D g)
          paint the handler.
 void setOpacity(int opacity)
           
 void setPoint(double x, double y)
          Changes the centre of the handler and updates the shape.
 void setSize(double size)
          Sets the width of the handler.
 void update()
          Updates the handler.
 void updateFromShape(java.awt.Shape shape)
          Updates the handler using the given shape.
 
Methods inherited from interface org.malai.picking.Pickable
contains, getPicker
 

Field Detail

DEFAULT_SIZE

static final int DEFAULT_SIZE
The default size of a handler.

See Also:
Constant Field Values
Method Detail

getOpacity

int getOpacity()
Returns:
The opacity of the handler.

setOpacity

void setOpacity(int opacity)
Parameters:
opacity - the opacity to set.

updateFromShape

void updateFromShape(java.awt.Shape shape)
Updates the handler using the given shape.

Parameters:
shape - The shape used to updated the handler.
Since:
3.0

setPoint

void setPoint(double x,
              double y)
Changes the centre of the handler and updates the shape.

Parameters:
x - The new X coordinate.
y - The new Y coordinate.

setSize

void setSize(double size)
Sets the width of the handler.

Parameters:
size - Its new width. Must be greater than 0.

getX

double getX()
Returns:
The X-coordinate of the handler.

getCentre

IPoint getCentre()
Returns:
The centre of the handler.

getY

double getY()
Returns:
The Y-coordinate of the handler.

paint

void paint(java.awt.Graphics2D g)
paint the handler.

Parameters:
g - The object into which objects are painted.

update

void update()
Updates the handler.


getSize

double getSize()
Returns:
the size of the handler.

getColour

java.awt.Color getColour()
Returns:
The colour of the handler.
Since:
3.0