|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectARoad0.Gui1.InternalFrameModel
public class InternalFrameModel
This class is responsible to manage the internal frames data and the trees data, following the MVC pattern. This includes Explorer, Beamer, Sketcher, IS structure, Architecture, ACS main frames and varied view frames. It has maps of the base objects and the GraphicViews displayed in main frames.
Field Summary | |
---|---|
private static javax.swing.JInternalFrame |
activeFrame__
|
private static javax.swing.JInternalFrame |
beamer__
|
private static javax.swing.JComponent |
beamerPane__
|
static javax.swing.JInternalFrame |
EMPTY_FRAME
|
private static javax.swing.JInternalFrame |
explorer__
|
private static javax.swing.JTree |
explorerTree__
|
private static javax.swing.JInternalFrame |
FullViewsframe__
|
private static int |
INITIAL_CAPACITY
|
private static InternalFrameModel |
instance__
the only instance of this class, following the singleton pattern |
private static java.util.List |
l_onGoingClosingOnBaseObjects__
dynamic list of names for the base objects for which ActionClose is closing the main frame. |
private static java.util.Map |
m_BaseObjectsInMainFrames__
current base objects displayed in dedicated main frames ; getName() gets the key do not include the object displayed in the beamer. |
private static java.util.Map |
m_JComponentsOfBaseObjects__
current JComponents (JTree, JPanel) displayed in dedicated main frames or JTabbedPanes, and associated to base objects. |
private static java.util.Map |
m_MainFramesOfBaseObjects__
current main frames associated to base objects ; the object name is the key does not include the beamer nor the 'EPR views' frame. |
private static javax.swing.JInternalFrame |
NoThanViewsframe__
|
private static javax.swing.JInternalFrame |
sketcher__
|
private static GraphicSketchView |
sketcherPane__
|
private static javax.swing.JInternalFrame |
structureframe__
|
private static javax.swing.JTree |
structureTree__
|
private static boolean |
withBeamer__
|
private static boolean |
withExplorer__
|
private static boolean |
withSketcher__
|
Constructor Summary | |
---|---|
InternalFrameModel()
only one private constructor |
Method Summary | |
---|---|
static void |
addBaseObjectJComponent(BaseObject _object,
javax.swing.JComponent _component)
Updates m_JComponentsOfBaseObjects__. |
(package private) static void |
addMainFrameBaseObject(BaseObject _object,
javax.swing.JInternalFrame _frame,
javax.swing.JComponent _component)
Updates m_BaseObjectsInMainFrames__, m_MainFramesOfBaseObjects__ and m_JComponentsOfBaseObjects__ with a lock on them. |
static void |
addOnGoingClosingFromActionClass(ImmutableName _name)
Update the dynamic list of names for the base objects which ActionCloseXXX is closing. |
static javax.swing.JInternalFrame |
getActiveFrame()
Get the frame which is active in the desktop. |
static javax.swing.JInternalFrame |
getAllFullViewsFrame()
Get the 'All full views' frame, if it exists. |
static javax.swing.JInternalFrame |
getAllNoThanViewsFrame()
Gets the 'All NoThan views' frame, if it exists. |
static java.util.Map |
getBaseObjectsInMainFrames()
Gets the objects in the base that are associated to main internal frame(s). |
static javax.swing.JInternalFrame |
getBeamer()
Gets the beamer. |
static javax.swing.JComponent |
getBeamerPane()
Get the pane in the beamer. |
static javax.swing.JInternalFrame |
getExplorer()
Gets the explorer. |
static InternalFrameModel |
getInstance()
Only method to get an instance. |
static java.util.Map |
getJComponentsOfBaseObjects()
Gets the JComponent (JTree, JPanel or GraphicView) that is associated to the base object in its main frame or tab in 'All view' tabbed pane. |
static java.util.Map |
getMainFramesOfBaseObjects()
Gets the main frames associated to the base objects. |
(package private) static java.util.List |
getOnGoingClosingFromActionClass()
Gets the list of names for the base objects that ActionClose is closing. |
static javax.swing.JInternalFrame |
getOpenedSeeWhyFrame(ImmutableName _viewName)
Gets the 'See why' frame of a view, if it is opened. |
static javax.swing.JInternalFrame |
getSketcher()
Gets the sketcher. |
static GraphicSketchView |
getSketcherPane()
Gets the sketch view in the sketcher. |
static javax.swing.JInternalFrame |
getStructureFrame()
Gets the 'IS structure' frame, if it exists. |
static javax.swing.JTree |
getTreeInExplorer()
Get the tree in the explorer. |
static javax.swing.JTree |
getTreeInStructure()
Gets the tree in the IS structure. |
static void |
removeBaseObjectJComponent(ImmutableName _name)
Updates m_JComponentsOfBaseObjects__. |
(package private) static void |
removeMainFrameBaseObject(ImmutableName _name)
Updates m_BaseObjectsInMainFrames__, m_MainFramesOfBaseObjects__ and m_JComponentsOfBaseObjects__ with a lock on them. |
(package private) static void |
removeOnGoingClosingFromActionClass(ImmutableName _name)
Removes a name for the base objects which are closing. |
(package private) static void |
setActiveFrame(javax.swing.JInternalFrame _frame)
Sets the frame which is active in the desktop. |
static void |
setAllFullViewsFrame(javax.swing.JInternalFrame _frame)
Sets the 'All full views' frame. |
static void |
setAllNoThanViewsFrame(javax.swing.JInternalFrame _frame)
Sets the 'All NoThan views' frame. |
(package private) static void |
setBeamer(javax.swing.JInternalFrame _frame,
javax.swing.JComponent _pane,
boolean _withBeamer)
Set the beamer. |
(package private) static void |
setExplorer(javax.swing.JInternalFrame _frame,
javax.swing.JTree _tree,
boolean _withExplorer)
Set the explorer. |
(package private) static void |
setSketcher(javax.swing.JInternalFrame _frame,
GraphicSketchView _pane,
boolean _withSketcher)
Set the sketcher. |
static void |
setStructureFrame(javax.swing.JInternalFrame _frame,
javax.swing.JTree _tree)
Sets the 'IS structure' frame. |
static boolean |
withAllFullViews()
True if the 'All full views' frame is displayed in the main window. |
static boolean |
withAllNoThanViews()
True if the 'All NoThan views' frame is displayed in the main window. |
static boolean |
withArchitecture()
True if the 'Architecture' frame is displayed in the main window. |
static boolean |
withBeamer()
True if the beamer is displayed in the main window. |
static boolean |
withExplorer()
True if the explorer is displayed in the main window. |
static boolean |
withSketcher()
True if the sketcher is displayed in the main window. |
static boolean |
withStructure()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static InternalFrameModel instance__
private static final int INITIAL_CAPACITY
private static java.util.Map m_BaseObjectsInMainFrames__
private static java.util.Map m_MainFramesOfBaseObjects__
private static java.util.Map m_JComponentsOfBaseObjects__
private static java.util.List l_onGoingClosingOnBaseObjects__
public static final javax.swing.JInternalFrame EMPTY_FRAME
private static javax.swing.JInternalFrame activeFrame__
private static javax.swing.JInternalFrame explorer__
private static javax.swing.JTree explorerTree__
private static boolean withExplorer__
private static javax.swing.JInternalFrame beamer__
private static javax.swing.JComponent beamerPane__
private static boolean withBeamer__
private static javax.swing.JInternalFrame FullViewsframe__
private static javax.swing.JInternalFrame NoThanViewsframe__
private static javax.swing.JInternalFrame structureframe__
private static javax.swing.JTree structureTree__
private static javax.swing.JInternalFrame sketcher__
private static GraphicSketchView sketcherPane__
private static boolean withSketcher__
Constructor Detail |
---|
public InternalFrameModel()
Method Detail |
---|
public static InternalFrameModel getInstance()
public static boolean withExplorer()
public static javax.swing.JInternalFrame getExplorer()
public static javax.swing.JTree getTreeInExplorer()
public static boolean withBeamer()
public static javax.swing.JInternalFrame getBeamer()
public static javax.swing.JComponent getBeamerPane()
public static boolean withSketcher()
public static javax.swing.JInternalFrame getSketcher()
public static GraphicSketchView getSketcherPane()
public static javax.swing.JInternalFrame getAllFullViewsFrame()
public static void setAllFullViewsFrame(javax.swing.JInternalFrame _frame)
_frame
- the 'All full views' frame. May be null.public static boolean withAllFullViews()
public static javax.swing.JInternalFrame getAllNoThanViewsFrame()
public static void setAllNoThanViewsFrame(javax.swing.JInternalFrame _frame)
_frame
- the 'All NoThan views' frame. May be null.public static boolean withAllNoThanViews()
public static javax.swing.JInternalFrame getStructureFrame()
public static javax.swing.JTree getTreeInStructure()
public static void setStructureFrame(javax.swing.JInternalFrame _frame, javax.swing.JTree _tree)
_frame
- the frame. May be null._tree
- the global structure tree. Never null.public static boolean withStructure()
public static boolean withArchitecture()
public static java.util.Map getBaseObjectsInMainFrames()
public static java.util.Map getMainFramesOfBaseObjects()
public static java.util.Map getJComponentsOfBaseObjects()
The object name is the map key. The object shown in the beamer is not in this map.
static java.util.List getOnGoingClosingFromActionClass()
public static javax.swing.JInternalFrame getOpenedSeeWhyFrame(ImmutableName _viewName)
_viewName
- is a view name for a view placed in a main frame or not,
with an open 'See why' frame or not. Never null.
public static javax.swing.JInternalFrame getActiveFrame()
static void setBeamer(javax.swing.JInternalFrame _frame, javax.swing.JComponent _pane, boolean _withBeamer)
_frame
- is the beamer. Has to be equals to new JInternalFrame
if _withBeamer is false. Never null._pane
- is the JComponent in the beamer. Has to be equals to
a new JComponent if _withBeamer is false. May be null._withBeamer
- has to be false if the beamer is closed.static void setExplorer(javax.swing.JInternalFrame _frame, javax.swing.JTree _tree, boolean _withExplorer)
_frame
- is the explorer. Has to be equals to new JInternalFrame
if _withExplorer is false._tree
- is the JTree in the explorer. Never null. Has to be equals to new JTree
if _withExplorer is false._withExplorer
- has to be false if the explorer is closed.static void setSketcher(javax.swing.JInternalFrame _frame, GraphicSketchView _pane, boolean _withSketcher)
_frame
- is the sketcher. Has to be equals to new JInternalFrame
if _withSketcher is false. Never null._pane
- is the sketch view in the sketcher. This method sets the internal value to
null if _withSketcher is false._withSketcher
- has to be false if the sketcher is closed.public static void addOnGoingClosingFromActionClass(ImmutableName _name)
_name
- ImmutableName of the base object which is closingstatic void addMainFrameBaseObject(BaseObject _object, javax.swing.JInternalFrame _frame, javax.swing.JComponent _component)
_object
- to declare_frame
- main frame associated to _object_component
- is the JTree, JPanel or the GraphicView associated to the ACS
or to the viewstatic void removeMainFrameBaseObject(ImmutableName _name)
_name
- of the object to removepublic static void addBaseObjectJComponent(BaseObject _object, javax.swing.JComponent _component)
_object
- to declare_component
- is the JTree, JPanel or GraphicView associated to _objectpublic static void removeBaseObjectJComponent(ImmutableName _name)
_name
- of the BaseObject to removestatic void removeOnGoingClosingFromActionClass(ImmutableName _name)
_name
- to removestatic void setActiveFrame(javax.swing.JInternalFrame _frame)
_frame
- which is currently active. May be EMPTY_FRAME.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |