net.sf.latexdraw.instruments
Class ShapeDeleter

java.lang.Object
  extended by org.malai.instrument.Instrument
      extended by org.malai.instrument.WidgetInstrument
          extended by net.sf.latexdraw.instruments.ShapeDeleter
All Implemented Interfaces:
ActionHandler, Preferenciable, Modifiable, Reinitialisable, UndoHandler

public class ShapeDeleter
extends WidgetInstrument

This instrument deletes the selected shapes.

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.

01/05/2010

Since:
3.0
Author:
Arnaud BLOUIN

Field Summary
protected  MButton deleteB
          The button used to remove the selected shapes.
 
Fields inherited from class org.malai.instrument.WidgetInstrument
composer
 
Fields inherited from class org.malai.instrument.Instrument
activated, eventables, links, modified
 
Constructor Summary
ShapeDeleter(UIComposer<?> composer)
          Creates the instrument.
 
Method Summary
 MButton getDeleteB()
           
protected  void initialiseLinks()
          Initialises the links of the instrument.
protected  void initialiseWidgets()
          Initialises the widgets of the instrument.
 void setActivated(boolean activated)
          Activates or deactivates the instrument.
 void setActivated(boolean activated, boolean hideWidgets)
          Activates or deactivates the instrument.
protected  void updateWidgets(boolean hideWidgets)
          Updates the widgets of this instrument.
 
Methods inherited from class org.malai.instrument.WidgetInstrument
getComposer
 
Methods inherited from class org.malai.instrument.Instrument
addEventable, addLink, clearEvents, getLinks, getSizeLinks, hasLinks, interimFeedback, isActivated, isModified, load, onActionAborted, onActionAdded, onActionCancelled, onActionDone, onActionExecuted, onUndoableAdded, onUndoableRedo, onUndoableUndo, reinit, removeLink, save, setModified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

deleteB

protected MButton deleteB
The button used to remove the selected shapes.

Constructor Detail

ShapeDeleter

public ShapeDeleter(UIComposer<?> composer)
Creates the instrument.

Parameters:
composer - The composer that manages the widgets of the instrument.
Since:
3.0
Method Detail

initialiseWidgets

protected void initialiseWidgets()
Description copied from class: WidgetInstrument
Initialises the widgets of the instrument.

Specified by:
initialiseWidgets in class WidgetInstrument

setActivated

public void setActivated(boolean activated,
                         boolean hideWidgets)
Description copied from class: WidgetInstrument
Activates or deactivates the instrument. This operation is related to Instrument.setActivated(boolean) but the difference is that is this opedeactivateration another parameter can be used to define is the widgets of the instrument must be hidden: in some cases, deactivating the instrument just implies disabling its widgets (but they are still visible); in some others cases, deactivating the instrument means hiding the widgets. Should be overridden to define the process of hiding the widgets.

Overrides:
setActivated in class WidgetInstrument
Parameters:
activated - True = activation.
hideWidgets - If true the widgets will be hidden. Only while deactivating the instrument.

setActivated

public void setActivated(boolean activated)
Description copied from class: Instrument
Activates or deactivates the instrument.

Overrides:
setActivated in class Instrument
Parameters:
activated - True = activation.

updateWidgets

protected void updateWidgets(boolean hideWidgets)
Updates the widgets of this instrument.

Parameters:
hideWidgets - True: the widgets are hidden on deactivation.
Since:
3.0

initialiseLinks

protected void initialiseLinks()
Description copied from class: Instrument
Initialises the links of the instrument.

Specified by:
initialiseLinks in class Instrument

getDeleteB

public MButton getDeleteB()
Returns:
The button used to remove the selected shapes.
Since:
3.0