public class DefaultDensitySlicingLine extends DefaultStraightLine implements DensitySlicingLine
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_LEVELS |
listSquare
maxx, minx
canvas, color
Constructor and Description |
---|
DefaultDensitySlicingLine(Color c)
Constructor.
|
DefaultDensitySlicingLine(Color c,
int levels)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
firstDrawActions()
Acciones a ejecutar antes del primer dibujado
|
int |
getFunctionType()
Devuelve 0 para indicar que estamos en una funcion lineal.
|
int |
getLevels() |
double |
getValueFunction()
En una función lineal da igual lo que devuelva, pero es interesante para sus
clases derivadas
|
boolean |
mouseDragged(MouseEvent e)
Cuando se ha pinchado un punto y se arrastra se define aquí su comportamiento.
|
boolean |
mouseMoved(MouseEvent e)
Metodo que se ejecuta cuando se esta moviendo el raton sobre el canvas
|
boolean |
mousePressed(MouseEvent e)
Se captura el punto a arrastrar, en caso de que no coincida con un punto,
se inserta
|
boolean |
mouseReleased(MouseEvent e)
Inicializamos el punto arrastrado a un valor fuera del array
|
void |
setShape(int levels)
Pone la forma a la línea escalonada dependiendo del número de
escalones existentes.
|
addSquare, clearSquares, clipDecimals, firstActions, getInValues, getOutValues, getPercentInValues, getPercentOutValues, paint, pixelToValueX, pixelToValueY, setCanvas, setShowSquares
setMaxX, setMinX
draw, getColor, isDrawing, mouseEntered, mouseExited, setCanvas, setColor, setDrawing
public static final int DEFAULT_LEVELS
public DefaultDensitySlicingLine(Color c)
c
- Colorpublic DefaultDensitySlicingLine(Color c, int levels)
c
- Colorpublic void setShape(int levels)
DensitySlicingLine
setShape
in interface DensitySlicingLine
public int getLevels()
getLevels
in interface DensitySlicingLine
public int getFunctionType()
StraightLine
getFunctionType
in interface StraightLine
getFunctionType
in class DefaultStraightLine
public double getValueFunction()
DefaultStraightLine
getValueFunction
in interface StraightLine
getValueFunction
in class DefaultStraightLine
public boolean mouseDragged(MouseEvent e)
DefaultStraightLine
mouseDragged
in class DefaultStraightLine
public boolean mouseMoved(MouseEvent e)
DrawableElement
mouseMoved
in class DefaultStraightLine
public boolean mousePressed(MouseEvent e)
DefaultStraightLine
mousePressed
in class DefaultStraightLine
public boolean mouseReleased(MouseEvent e)
DefaultStraightLine
mouseReleased
in class DefaultStraightLine
public void firstDrawActions()
DrawableElement
firstDrawActions
in class DefaultStraightLine