org.pietschy.command.demo

Class PageSelectCommand

Implemented Interfaces:
ActionCommandExecutor

public class PageSelectCommand
extends ToggleCommand

GUI Commands Copyright 2004 Andrew Pietsch Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. $Id: PageSelectCommand.java,v 1.7 2005/01/09 03:24:04 pietschy Exp $

Field Summary

Fields inherited from class org.pietschy.command.ActionCommand

HINT_ACTION_EVENT, HINT_INVOKER, HINT_INVOKER_WINDOW, HINT_MODIFIERS

Fields inherited from class org.pietschy.command.Command

internalLog, listenerList, pcs

Constructor Summary

PageSelectCommand(String commandId, DemoPanel panel)

Method Summary

protected void
handleSelection(boolean selected)
Entry for subclasses to handle the selection process.

Methods inherited from class org.pietschy.command.ToggleCommand

addNotify, applySelection, attemptSelection, configureButtonStates, createButton, createCheckBox, createCheckBox, createCheckBox, createCheckBox, createMenuItem, handleExecute, handleSelection, isSelected, removeNotify, requestDefautIn, setSelected

Methods inherited from class org.pietschy.command.ActionCommand

addCommandListener, addInterceptor, areEqual, attach, configureButtonStates, detach, execute, execute, getActionAdapter, getActionAdapter, getActionCommand, getActionEvent, getHint, getHint, getHints, getInvoker, getInvokerWindow, getModifiers, handleExecute, installShortCut, installShortCut, postExecute, preExecute, putHint, putHints, removeCommandListener, removeInterceptor, requestDefautIn, setActionCommand, uninstallShortCut, uninstallShortCut

Methods inherited from class org.pietschy.command.Command

addFace, addHoverListener, addNewFace, addNotify, addPropertyChangeListener, addPropertyChangeListener, attach, buttonIterator, configureButtonAppearance, configureButtonAppearances, configureButtonAppearances, configureButtonStates, createButton, createButton, createButton, createButton, createMenuItem, createMenuItem, createMenuItem, createMenuItem, detach, export, faceExists, fireHoverEnded, fireHoverStarted, getAccelerator, getAlternativeFaceNames, getButtonFactory, getButtonIn, getCommandManager, getDefaultFace, getDefaultFace, getDescription, getFace, getFace, getIcon, getId, getLongDescription, getMenuFactory, getMnemonic, getMnemonicIndex, getProperty, getProperty, getPropertyNames, getSelectedIcon, getText, getTextPosition, getToolbarFactory, initCommandManager, installFace, isAnonymous, isAttachedTo, isEnabled, isVisible, putProperty, removeHoverListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, requestFocusIn, setAccelerator, setButtonFactory, setDescription, setEnabled, setIcon, setLongDescription, setMenuFactory, setMnemonic, setMnemonicIndex, setSelectedIcon, setText, setTextPosition, setToolbarFactory, setVisible, toString

Constructor Details

PageSelectCommand

public PageSelectCommand(String commandId,
                         DemoPanel panel)

Method Details

handleSelection

protected void handleSelection(boolean selected)
Entry for subclasses to handle the selection process. When a request to change the selection is made, this method will be called. The selection process will continue with the value that is returned from this method. Thus, to cancel a selection change the method would return !selected, to implement a do-nothing subclass that always toggles this method should just return selected. Please note that the current state of PageSelectCommand will not be updated until after this method has been called and so should not be used in this method.
Overrides:
handleSelection in interface ToggleCommand
Parameters:
selected - the requested selection state.