Package xj3d.browser
Class AntialiasingAction
java.lang.Object
javax.swing.AbstractAction
xj3d.browser.AntialiasingAction
- All Implemented Interfaces:
ActionListener
,Serializable
,Cloneable
,EventListener
,Action
An action that can be used to change antialiasing modes.
- Version:
- $Revision: 1.2 $
- Author:
- Justin Couch, Alan Hudson
- See Also:
-
Field Summary
FieldsFields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
-
Constructor Summary
ConstructorsConstructorDescriptionAntialiasingAction
(SurfaceManager manager, SwingStatusBar statusBar) Create an instance of the action class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
An action has been performed.int
Get the maximum number of samples.void
setDesiredSamples
(int desired) Set the desired samples.Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
statusBar
The status bar
-
-
Constructor Details
-
AntialiasingAction
Create an instance of the action class.- Parameters:
manager
- The surface managerstatusBar
- a SwingStatusBar
-
-
Method Details
-
actionPerformed
An action has been performed. This is the result of ALT-A being selected to cycle through antialiasing sample rates that the graphics card can support through cycling AA off.- Parameters:
evt
- The event that caused this method to be called.
-
getMaximumNumberOfSamples
public int getMaximumNumberOfSamples()Get the maximum number of samples.- Returns:
- the maximum number of samples
-
setDesiredSamples
public void setDesiredSamples(int desired) Set the desired samples. This will be capped at the current system maximum.- Parameters:
desired
- The desired number of samples
-