org.kahina.core.gui
Class KahinaArrangement
java.lang.Object
org.kahina.core.gui.KahinaArrangement
public class KahinaArrangement
- extends Object
Storage for window configurations in a perspective.
This class represents the arrangement, size and position of all the windows
in a Kahina perspective. It can be used as an instruction package for a
KahinaWindowManager how to arrange and combine view windows. Manipulating
this does NOT directly affect window configuration, an arrangement needs to
be processed by the KahinaWindowManager.
Arrangements can be stored and restored as parts of profiles for persistence.
|
Field Summary |
static boolean |
verbose
|
|
Method Summary |
void |
addWindow(int winID)
|
void |
bindWindow(int windowID,
String binding)
|
KahinaArrangement |
copy()
|
void |
disposeWindow(int winID)
Removes all the data for some window, only for internal use. |
Element |
exportXML(Document dom)
|
List<Integer> |
getAllWindows()
|
String |
getBindingForWinID(int winID)
|
Set<Integer> |
getContentWindows()
|
Set<Integer> |
getContentWindowsWithoutMainWindow()
|
int |
getEmbeddingWindowID(int windowID)
|
int |
getHeight(int windowID)
|
int |
getMainWindowID()
|
int |
getPrimaryWinIDForName(String name)
|
double |
getResizeWeight(int winID)
|
String |
getTitle(int windowID)
|
Set<Integer> |
getTopLevelWindows()
|
Set<Integer> |
getTopLevelWindowsWithoutMainWindow()
|
int |
getWidth(int windowID)
|
int |
getWindowType(int windowID)
|
int |
getXPos(int windowID)
|
int |
getYPos(int windowID)
|
boolean |
hasBorder(int viewID)
|
static KahinaArrangement |
importXML(Element topEl)
|
void |
setBorder(int viewID,
boolean bor)
|
void |
setEmbeddingWindowID(int windowID,
int embeddingID)
|
void |
setHeight(int windowID,
int h)
|
void |
setMainWindowID(int mainWindowID)
|
void |
setPrimaryWindow(String binding,
int winID)
|
void |
setResizeWeight(int windowID,
double resizeWeight)
|
void |
setSize(int windowID,
int w,
int h)
|
void |
setTitle(int windowID,
String t)
|
void |
setWidth(int windowID,
int w)
|
void |
setWindowType(int windowID,
int type)
Sets the window type for some windowID. |
void |
setXPos(int windowID,
int pos)
|
void |
setYPos(int windowID,
int pos)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
verbose
public static boolean verbose
KahinaArrangement
public KahinaArrangement()
copy
public KahinaArrangement copy()
addWindow
public void addWindow(int winID)
setXPos
public void setXPos(int windowID,
int pos)
setYPos
public void setYPos(int windowID,
int pos)
setHeight
public void setHeight(int windowID,
int h)
setWidth
public void setWidth(int windowID,
int w)
setSize
public void setSize(int windowID,
int w,
int h)
setResizeWeight
public void setResizeWeight(int windowID,
double resizeWeight)
setTitle
public void setTitle(int windowID,
String t)
setWindowType
public void setWindowType(int windowID,
int type)
- Sets the window type for some windowID. Refuses to change the type of a
window once it is defined.
- Parameters:
windowID - type -
setBorder
public void setBorder(int viewID,
boolean bor)
setEmbeddingWindowID
public void setEmbeddingWindowID(int windowID,
int embeddingID)
setPrimaryWindow
public void setPrimaryWindow(String binding,
int winID)
bindWindow
public void bindWindow(int windowID,
String binding)
disposeWindow
public void disposeWindow(int winID)
- Removes all the data for some window, only for internal use. To remove a
window consistently, use KahinaWindowEventType.DISPOSE.
- Parameters:
winID - the ID of the window to be removed
getXPos
public int getXPos(int windowID)
getYPos
public int getYPos(int windowID)
getHeight
public int getHeight(int windowID)
getWidth
public int getWidth(int windowID)
getResizeWeight
public double getResizeWeight(int winID)
getTitle
public String getTitle(int windowID)
getWindowType
public int getWindowType(int windowID)
hasBorder
public boolean hasBorder(int viewID)
getEmbeddingWindowID
public int getEmbeddingWindowID(int windowID)
getBindingForWinID
public String getBindingForWinID(int winID)
getPrimaryWinIDForName
public int getPrimaryWinIDForName(String name)
getAllWindows
public List<Integer> getAllWindows()
getTopLevelWindows
public Set<Integer> getTopLevelWindows()
getTopLevelWindowsWithoutMainWindow
public Set<Integer> getTopLevelWindowsWithoutMainWindow()
getContentWindows
public Set<Integer> getContentWindows()
getContentWindowsWithoutMainWindow
public Set<Integer> getContentWindowsWithoutMainWindow()
importXML
public static KahinaArrangement importXML(Element topEl)
exportXML
public Element exportXML(Document dom)
setMainWindowID
public void setMainWindowID(int mainWindowID)
getMainWindowID
public int getMainWindowID()