forked from kptran/mct
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added documentation to local controls classes in fastPlot.
Package gov.nasa.arc.mct.fastplot.bridge.controls introduces several classes/interfaces for dealing with local control elements in a uniform way; added documentation of the role of these classes.
- Loading branch information
Showing
10 changed files
with
147 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 26 additions & 1 deletion
27
...main/java/gov/nasa/arc/mct/fastplot/bridge/controls/AbstractPlotLocalControlsManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,31 @@ | ||
package gov.nasa.arc.mct.fastplot.bridge.controls; | ||
|
||
public interface AbstractPlotLocalControlsManager { | ||
/** | ||
* Manages the local controls for a given plot. Primarily used to communicate user | ||
* interactions to specific controls when the control is not able to listen for them | ||
* locally in the Swing hierarchy (specifically, many controls are interested in either | ||
* whether or not the mouse is over the plot area, or need to listen for key events | ||
* even when they don't have focus.) | ||
* | ||
* Note: May consider removing this and simply return a Collection<AbstractPlotLocalControl> | ||
* from AbstractPlottingPackage to simplify API. (The current implementation | ||
* permits some cross-compatibility with the older PlotLocalControlManager.) | ||
* | ||
* @see gov.nasa.arc.mct.fastplot.bridge.AbstractPlottingPackage#getLocalControlsManager() | ||
* | ||
* @author vwoeltje | ||
*/ | ||
public interface AbstractPlotLocalControlsManager { | ||
/** | ||
* Notify local controls that a specific key has been pressed or released. | ||
* @param key the key code pressed/released (one of KeyEvent.VK_*) | ||
* @param pressed true if press; false if released | ||
*/ | ||
public void informKeyState(int key, boolean pressed); | ||
|
||
/** | ||
* Notify local controls of changes to the mouse position with regard to the plot | ||
* @param inPlotArea true if hovering over plot; false if mouse has left | ||
*/ | ||
public void informMouseHover(boolean inPlotArea); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.