|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.jscroll.widgets.DesktopMediator
This class coordinates state changes between other classes in the system. Based upon the "mediator" design pattern.
| Field Summary |
| Fields inherited from interface org.jscroll.widgets.DesktopConstants |
CONTENTS_CHANGED_COLOR, MAX_FRAMES, MAXIMUM_BUTTON_WIDTH, MINIMUM_BUTTON_WIDTH, X_OFFSET, Y_OFFSET |
| Constructor Summary | |
DesktopMediator(JScrollDesktopPane mainPane)
creates the DesktopMediator object. |
|
| Method Summary | |
void |
actionPerformed(ActionEvent e)
propogates actionPerformed event to DesktopListener |
void |
add(JInternalFrame frame,
int x,
int y)
adds an internal frame to the scrollable desktop pane |
JInternalFrame |
add(String title,
ImageIcon icon,
JPanel frameContents,
boolean isClosable,
int x,
int y)
adds an internal frame to the scrollable desktop pane |
void |
cascadeInternalFrames()
propogates cascadeInternalFrames to DesktopScrollPane |
void |
centerView(JScrollInternalFrame f)
propogates centerView to DesktopScrollPane |
void |
closeSelectedFrame()
propogates closeSelectedFrame to DesktopScrollPane |
void |
flagContentsChanged(JInternalFrame f)
propogates flagContentsChanged to DesktopScrollPane |
JInternalFrame |
getSelectedFrame()
propogates getSelectedFrame to DesktopScrollPane |
void |
registerMenuBar(JMenuBar mb)
registers a menubar with the mediator, applying the "Window" menu items to that menubar in the process. |
void |
removeAssociatedComponents(JScrollInternalFrame f)
removes the secondary components associated with an internal frame, such as toggle and menu buttons, and selects the next available frame |
void |
resizeDesktop()
propogates resizeDesktop to DesktopScrollPane |
void |
revalidateViewport()
propogates revalidateViewport to DesktopScrollPane |
void |
setAutoTile(boolean tileMode)
propogates setAutoTile to DesktopScrollPane |
void |
setSelectedFrame(JInternalFrame f)
propogates setSelectedFrame to DesktopScrollPane |
void |
tileInternalFrames()
propogates tileInternalFrames to DesktopScrollPane |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DesktopMediator(JScrollDesktopPane mainPane)
mainPane - a reference to the JScrollDesktopPane that this
object is to mediate.| Method Detail |
public void registerMenuBar(JMenuBar mb)
mb - the menubar to register
public JInternalFrame add(String title,
ImageIcon icon,
JPanel frameContents,
boolean isClosable,
int x,
int y)
title - the title displayed in the title bar of the internal frameicon - the icon displayed in the title bar of the internal frameframeContents - the contents of the internal frameisClosable - boolean indicating whether
internal frame is closablex - x coordinates of internal frame within the scrollable desktop
-1 indicates the virtual desktop is to determine
the positiony - y coordinates of internal frame within the scrollable desktop
-1 indicates the virtual desktop is to
determine the position
public void add(JInternalFrame frame,
int x,
int y)
frame - the internal frame of class JScrollInternalFrame to addx - x coordinates of internal frame within the scrollable desktop
-1 indicates the virtual desktop is to determine
the positiony - y coordinates of internal frame within the scrollable desktop
-1 indicates the virtual desktop is to determine
the positionpublic void removeAssociatedComponents(JScrollInternalFrame f)
f - the internal frame whose associated components are
to be removedpublic JInternalFrame getSelectedFrame()
public void setSelectedFrame(JInternalFrame f)
f - the internal frame to set as selectedpublic void flagContentsChanged(JInternalFrame f)
f - the internal frame to flag as "contents changed"public void resizeDesktop()
public void revalidateViewport()
public void centerView(JScrollInternalFrame f)
f - the internal frame to center the view aboutpublic void closeSelectedFrame()
public void tileInternalFrames()
public void cascadeInternalFrames()
public void setAutoTile(boolean tileMode)
tileMode - true indicates tile internal frames,
false indicates cascade internal framespublic void actionPerformed(ActionEvent e)
e - the ActionEvent to propogate
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||