net.sf.latexdraw.instruments
Class PreferencesActivator

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

public class PreferencesActivator
extends WidgetInstrument

This instrument activates the preferences setter and shows the preferences frame.

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/18/11

Version:
3.0
Author:
Arnaud BLOUIN

Field Summary
protected  PreferencesFrame preferenceFrame
          The frame containing the widgets of the preferences setter.
protected  PreferencesSetter prefSetter
          The instrument that modifies the preferences.
protected  MMenuItem showPreferencesMenu
          The menu item used to activate the setter.
 
Fields inherited from class org.malai.instrument.WidgetInstrument
composer
 
Fields inherited from class org.malai.instrument.Instrument
activated, eventables, links, modified
 
Constructor Summary
PreferencesActivator(UIComposer<?> composer, PreferencesSetter prefSetter)
          Creates the instrument.
 
Method Summary
 MMenuItem getShowPreferencesMenu()
           
protected  void initialiseLinks()
          Initialises the links of the instrument.
 PreferencesFrame initialisePreferencesFrame()
          Initialises and returns the preferences frame.
protected  void initialiseWidgets()
          Initialises the widgets of the instrument.
 
Methods inherited from class org.malai.instrument.WidgetInstrument
getComposer, setActivated
 
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, setActivated, setModified
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

preferenceFrame

protected PreferencesFrame preferenceFrame
The frame containing the widgets of the preferences setter.


showPreferencesMenu

protected MMenuItem showPreferencesMenu
The menu item used to activate the setter.


prefSetter

protected PreferencesSetter prefSetter
The instrument that modifies the preferences.

Constructor Detail

PreferencesActivator

public PreferencesActivator(UIComposer<?> composer,
                            PreferencesSetter prefSetter)
Creates the instrument.

Parameters:
composer - The composer that manages the widgets of the instrument.
prefSetter - The instrument that modifies the preferences.
Throws:
java.lang.IllegalArgumentException - If the given instrument is null.
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

initialiseLinks

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

Specified by:
initialiseLinks in class Instrument

initialisePreferencesFrame

public PreferencesFrame initialisePreferencesFrame()
Initialises and returns the preferences frame.

Returns:
The preferences frame.
Since:
3.0

getShowPreferencesMenu

public MMenuItem getShowPreferencesMenu()
Returns:
the menu item used to activates the setter.
Since:
3.0