|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel standup.clouds.CloudFrontend
public class CloudFrontend
The main class that launches the STANDUP GUI and sets up all the various user interface components.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static int |
animationDelay
Delay in milliseconds between 'frames' of animation. |
private boolean |
atProfileSelectionStage
This field records whether the user is currently at the profile selection stage, or whether a profile has been chosen and someone is using the system proper. |
private Backend |
backend
|
private BufferedImage |
backgroundNoProgressMap
|
private BufferedImage |
backgroundProgressMap
|
(package private) Hashtable<String,LexemeSet> |
cachedWordClusters
|
(package private) WordTrie |
cachedWordTrie
|
private JFrame |
ff
|
private static JFrame |
frame
Create the GUI and show it. |
private ProfileCloudFrontend |
frontendProfile
Fields and methods that handle scanning functionality |
private int |
height
|
private HelpCoordinator |
helpCoordinator
|
private HistoryCoordinator |
historyCoordinator
|
private boolean |
isInteractive
|
private Logger |
logger
|
private PanelMessageWindow |
messageWindow
|
private CloudDialog |
myDialog
|
private CloudDialogNonModal |
myDialogNonModal
|
private PanelCloudButtonMenu |
panelCloudButtonMenu
|
private PanelProgressMap |
panelProgressMap
|
private PanelToolbar |
panelToolbar
|
private Scanner |
scanner
|
private static long |
serialVersionUID
|
STANDUPSpeaker |
speaker
|
private int |
width
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
CloudFrontend(JFrame _ff,
int w,
int h,
Logger log,
STANDUPSpeaker spk,
Scanner scn,
Backend bck,
boolean interact,
boolean hideDecorations)
Constructor for the Frontend. |
Method Summary | |
---|---|
boolean |
animationInProgress()
|
void |
clickScanner()
Sends a 'click' to the Scanner , i.e. |
private static void |
createAndShowGUI(Backend backendInstance)
|
boolean |
createProfile(File directory)
Instantiates a 'default' profile and saves it in the specified user directory. |
void |
dehighlightAll()
|
Backend |
getBackend()
|
JFrame |
getFrame()
|
int |
getHeight()
|
HelpCoordinator |
getHelpCoordinator()
|
HistoryCoordinator |
getHistoryCoordinator()
|
(package private) Logger |
getLogger()
|
CloudButton |
getMainMenu()
This displays the main menu -- implements Use Case 1 in the Frontend spec doc. |
PanelMessageWindow |
getMessageWindow()
|
CloudDialog |
getMyDialog()
|
CloudDialogNonModal |
getMyDialogNonModal()
|
PanelCloudButtonMenu |
getPanelCloudButtonMenu()
|
(package private) PanelProgressMap |
getPanelProgressMap()
|
PanelToolbar |
getPanelToolbar()
|
ProfileCloudFrontend |
getProfile()
Returns the Profile currently being used by this
Profileable . |
String |
getProfileFilename()
Returns the filename used to specify the profile filename. |
STANDUPSpeaker |
getSpeaker()
|
String |
getVersionNumber()
|
int |
getWidth()
|
(package private) Hashtable<String,LexemeSet> |
getWordClusters()
|
(package private) WordTrie |
getWordTrie()
|
boolean |
isAtProfileSelectionStage()
Returns true if the user is at the profile selection
stage, and false otherwise. |
(package private) boolean |
isInteractive()
|
Profile |
loadProfile(File directory)
Loads the Profile associated with this Profileable from
the specified directory and returns it. |
void |
lostOwnership(Clipboard arg0,
Transferable arg1)
|
static void |
main(String[] args)
|
protected void |
paintComponent(Graphics arg0)
|
void |
pauseScanner()
|
(package private) void |
recomputeWordClusters()
|
void |
resetMainGUIPanels()
|
(package private) void |
resetPanels(boolean apss,
PanelToolbar tb,
PanelMessageWindow mw,
PanelProgressMap pm,
PanelCloudButtonMenu bb)
|
void |
resetProfileChooser()
This method brings up the 'profile chooser' menu. |
void |
resetScanner()
|
void |
resumeScanner()
|
void |
setAtProfileSelectionStage(boolean apss)
Sets the atProfileSelectionStage field. |
void |
setHeight(int height)
|
void |
setMyDialog(CloudDialog myd)
|
boolean |
setProfile(Profile profile,
boolean repeat)
This sets the CloudFrontendProfile. |
void |
setWidth(int width)
|
(package private) void |
showMainMenu()
|
(package private) void |
showProfileChooser()
|
void |
tryToEnd()
|
void |
tryToExit()
|
void |
tryToGoHome()
|
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private PanelToolbar panelToolbar
private PanelCloudButtonMenu panelCloudButtonMenu
private PanelMessageWindow messageWindow
private PanelProgressMap panelProgressMap
private CloudDialog myDialog
private final CloudDialogNonModal myDialogNonModal
private final HistoryCoordinator historyCoordinator
private final HelpCoordinator helpCoordinator
private final Scanner scanner
private final Logger logger
public STANDUPSpeaker speaker
public static final int animationDelay
private final JFrame ff
private final Backend backend
private boolean atProfileSelectionStage
resetProfileChooser()
is called
private int width
private int height
private final BufferedImage backgroundProgressMap
private final BufferedImage backgroundNoProgressMap
private final boolean isInteractive
private static JFrame frame
Hashtable<String,LexemeSet> cachedWordClusters
WordTrie cachedWordTrie
private ProfileCloudFrontend frontendProfile
Constructor Detail |
---|
public CloudFrontend(JFrame _ff, int w, int h, Logger log, STANDUPSpeaker spk, Scanner scn, Backend bck, boolean interact, boolean hideDecorations)
w
- h
- log
- spk
- scn
- bck
- interact
- Method Detail |
---|
public PanelToolbar getPanelToolbar()
public PanelCloudButtonMenu getPanelCloudButtonMenu()
public PanelMessageWindow getMessageWindow()
PanelProgressMap getPanelProgressMap()
public CloudDialog getMyDialog()
public void setMyDialog(CloudDialog myd)
public CloudDialogNonModal getMyDialogNonModal()
public HistoryCoordinator getHistoryCoordinator()
public HelpCoordinator getHelpCoordinator()
public void clickScanner()
Scanner
, i.e. calls
Scanner.clickScanner()
, if warranted
public void pauseScanner()
public void resumeScanner()
public void resetScanner()
Logger getLogger()
public STANDUPSpeaker getSpeaker()
public JFrame getFrame()
public Backend getBackend()
public void resetMainGUIPanels()
public void resetProfileChooser()
void resetPanels(boolean apss, PanelToolbar tb, PanelMessageWindow mw, PanelProgressMap pm, PanelCloudButtonMenu bb)
public boolean isAtProfileSelectionStage()
true
if the user is at the profile selection
stage, and false
otherwise.
true
if the user is at the profile selection
stage, and false
otherwisepublic void setAtProfileSelectionStage(boolean apss)
atProfileSelectionStage
field.
apss
- new value for atProfileSelectionStage
void showProfileChooser()
void showMainMenu()
public CloudButton getMainMenu()
boolean isInteractive()
protected void paintComponent(Graphics arg0)
paintComponent
in class JComponent
public void tryToEnd()
public void tryToExit()
public void tryToGoHome()
private static void createAndShowGUI(Backend backendInstance)
public static void main(String[] args) throws Exception
Exception
public void lostOwnership(Clipboard arg0, Transferable arg1)
lostOwnership
in interface ClipboardOwner
public void dehighlightAll()
public String getVersionNumber()
public int getHeight()
getHeight
in class JComponent
public void setHeight(int height)
public int getWidth()
getWidth
in class JComponent
public void setWidth(int width)
Hashtable<String,LexemeSet> getWordClusters()
WordTrie getWordTrie()
void recomputeWordClusters()
public boolean animationInProgress()
public boolean createProfile(File directory)
Profileable
ProfileManager.getUserDirectory(String)
.
createProfile
in interface Profileable
public ProfileCloudFrontend getProfile()
Profileable
Profile
currently being used by this
Profileable
.
getProfile
in interface Profileable
Profile
public String getProfileFilename()
Profileable
Profile
s, and they are all
stored in the same user directory, the profile filenames must be unique.
Convention is to use a .profile
file extension, e.g.
'jokegeneration.profile'
, 'lexical.profile'
,
'clouds.profile'
, etc..
getProfileFilename
in interface Profileable
public Profile loadProfile(File directory)
Profileable
Profile
associated with this Profileable
from
the specified directory and returns it. Assumes that the directory has
been created, and that it contains a file whose name is the same as that
given by Profileable.getProfileFilename()
. Note that it doesn't actually
use/set the returned Profile
-- call
Profileable.setProfile(Profile, boolean)
for that.
Really this should be a static method, but Java interfaces cannot specify static methods.
loadProfile
in interface Profileable
directory
- The directory containing the profile (and associated files)
Profile
public boolean setProfile(Profile profile, boolean repeat)
setProfile
in interface Profileable
profile
- repeat
- whether this is the first time a profile is being set for the
current user during this session
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |