📄 rootwindowproperties.java
字号:
PropertyMapManager.runBatch(new Runnable() {
public void run() {
updateVisualProperties();
updateViewTitleBarProperties();
}
});
}
public void propertiesChanging() {
}
public void lookAndFeelChanging() {
}
});
}
/**
* Creates a property object that inherits default property values.
*
* @return a new property object that inherits default property values
*/
public static RootWindowProperties createDefault() {
return new RootWindowProperties(DEFAULT_VALUES);
}
/**
* Creates an empty property object.
*/
public RootWindowProperties() {
super(PropertyMapFactory.create(PROPERTIES));
}
/**
* Creates a property object containing the map.
*
* @param map the property map
*/
public RootWindowProperties(PropertyMap map) {
super(map);
}
/**
* Creates a property object which inherits property values from another object.
*
* @param inheritFrom the object which from to inherit property values
*/
public RootWindowProperties(RootWindowProperties inheritFrom) {
super(PropertyMapFactory.create(inheritFrom.getMap()));
}
/**
* Adds a super object from which property values are inherited.
*
* @param properties the object from which to inherit property values
* @return this
*/
public RootWindowProperties addSuperObject(RootWindowProperties properties) {
getMap().addSuperMap(properties.getMap());
return this;
}
/**
* Removes the last added super object.
*
* @return this
* @since IDW 1.1.0
* @deprecated Use {@link #removeSuperObject(RootWindowProperties)} instead.
*/
public RootWindowProperties removeSuperObject() {
getMap().removeSuperMap();
return this;
}
/**
* Removes a super object.
*
* @param superObject the super object to remove
* @return this
* @since IDW 1.3.0
*/
public RootWindowProperties removeSuperObject(RootWindowProperties superObject) {
getMap().removeSuperMap(superObject.getMap());
return this;
}
/**
* Replaces a super object.
*
* @param oldSuperObject the super object to be replaced
* @param newSuperObject the super object to replace it with
* @return this
* @since IDW 1.3.0
*/
public RootWindowProperties replaceSuperObject(RootWindowProperties oldSuperObject,
RootWindowProperties newSuperObject) {
getMap().replaceSuperMap(oldSuperObject.getMap(), newSuperObject.getMap());
return this;
}
/**
* Returns the default property values for tab windows.
*
* @return the default property values for tab windows
*/
public TabWindowProperties getTabWindowProperties() {
return new TabWindowProperties(TAB_WINDOW_PROPERTIES.get(getMap()));
}
/**
* Returns the default property values for split windows.
*
* @return the default property values for split windows
*/
public SplitWindowProperties getSplitWindowProperties() {
return new SplitWindowProperties(SPLIT_WINDOW_PROPERTIES.get(getMap()));
}
/**
* Returns the default property values for floating windows.
*
* @return the default property values for floating windows
* @since IDW 1.4.0
*/
public FloatingWindowProperties getFloatingWindowProperties() {
return new FloatingWindowProperties(FLOATING_WINDOW_PROPERTIES.get(getMap()));
}
/**
* Returns the default property values for views.
*
* @return the default property values for views
*/
public ViewProperties getViewProperties() {
return new ViewProperties(VIEW_PROPERTIES.get(getMap()));
}
/**
* Returns the default property values for docking windows.
*
* @return the default property values for docking windows
*/
public DockingWindowProperties getDockingWindowProperties() {
return new DockingWindowProperties(DOCKING_WINDOW_PROPERTIES.get(getMap()));
}
/**
* Sets the border width of the drag rectangle.
*
* @param width the border width
* @return this
*/
public RootWindowProperties setDragRectangleBorderWidth(int width) {
DRAG_RECTANGLE_BORDER_WIDTH.set(getMap(), width);
return this;
}
/**
* Returns the border width of the drag rectangle.
*
* @return the border width of the drag rectangle
*/
public int getDragRectangleBorderWidth() {
return DRAG_RECTANGLE_BORDER_WIDTH.get(getMap());
}
/**
* Returns true if the user is allowed to place tab windows inside other tab windows.
*
* @return true if tab windows are allowed to be placed in other tab windows
*/
public boolean getRecursiveTabsEnabled() {
return RECURSIVE_TABS_ENABLED.get(getMap());
}
/**
* Returns true if double clicking on a window tab in a window bar restores the window.
*
* @return true if double clicking on a window tab in a window bar restores the window
*/
public boolean getDoubleClickRestoresWindow() {
return DOUBLE_CLICK_RESTORES_WINDOW.get(getMap());
}
/**
* If set to true, double clicking on a window tab in a window bar restores the window.
*
* @param enabled if true, double clicking on a window tab in a window bar restores the window
* @return this
*/
public RootWindowProperties setDoubleClickRestoresWindow(boolean enabled) {
DOUBLE_CLICK_RESTORES_WINDOW.set(getMap(), enabled);
return this;
}
/**
* If set to true, the user is allowed to place tab windows inside other tab windows.
*
* @param enabled if true, the user is allowed to place tab windows inside other tab windows
* @return this
*/
public RootWindowProperties setRecursiveTabsEnabled(boolean enabled) {
RECURSIVE_TABS_ENABLED.set(getMap(), enabled);
return this;
}
/**
* Returns the property values for the drag label.
*
* @return the property values for the drag label
*/
public ComponentProperties getDragLabelProperties() {
return new ComponentProperties(DRAG_LABEL_PROPERTIES.get(getMap()));
}
/**
* Returns the property values for the root window component.
*
* @return the property values for the root window component
*/
public ComponentProperties getComponentProperties() {
return new ComponentProperties(COMPONENT_PROPERTIES.get(getMap()));
}
/**
* Returns the property values for the root window shaped panel.
*
* @return the property values for the root window shaped panel
* @since IDW 1.2.0
*/
public ShapedPanelProperties getShapedPanelProperties() {
return new ShapedPanelProperties(SHAPED_PANEL_PROPERTIES.get(getMap()));
}
/**
* Returns the component property values for the window area component.
*
* @return the component property values for the window area component
*/
public ComponentProperties getWindowAreaProperties() {
return new ComponentProperties(WINDOW_AREA_PROPERTIES.get(getMap()));
}
/**
* Returns the shaped panel property values for the window area component.
*
* @return the shaped panel property values for the window area component
*/
public ShapedPanelProperties getWindowAreaShapedPanelProperties() {
return new ShapedPanelProperties(WINDOW_AREA_SHAPED_PANEL_PROPERTIES.get(getMap()));
}
/**
* Sets the distance from the window edge inside which a mouse drag will trigger a window split.
*
* @param size the distance from the window edge inside which a mouse drag will trigger a window split
* @return this
*/
public RootWindowProperties setEdgeSplitDistance(int size) {
EDGE_SPLIT_DISTANCE.set(getMap(), size);
return this;
}
/**
* Returns the distance from the window edge inside which a mouse drag will trigger a window split.
*
* @return the distance from the window edge inside which a mouse drag will trigger a window split
*/
public int getEdgeSplitDistance() {
return EDGE_SPLIT_DISTANCE.get(getMap());
}
/**
* Returns the key code for the key that aborts a drag.
*
* @return the key code for the key that aborts a drag
*/
public int getAbortDragKey() {
return ABORT_DRAG_KEY.get(getMap());
}
/**
* Sets the key code for the key that aborts a drag.
*
* @param key the key code for the key that aborts a drag
* @return this
*/
public RootWindowProperties setAbortDragKey(int key) {
ABORT_DRAG_KEY.set(getMap(), key);
return this;
}
/**
* Returns the default window bar property values.
*
* @return the default window bar property values
* @since IDW 1.1.0
*/
public WindowBarProperties getWindowBarProperties() {
return new WindowBarProperties(WINDOW_BAR_PROPERTIES.get(getMap()));
}
/**
* Shaped panel properties for the drag rectangle. Setting a painter disables the default drag rectangle.
*
* @return the drag rectangle shaped panel properties
* @since IDW 1.2.0
*/
public ShapedPanelProperties getDragRectangleShapedPanelProperties() {
return new ShapedPanelProperties(DRAG_RECTANGLE_SHAPED_PANEL_PROPERTIES.get(getMap()));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -