📄 viewtitlebarstateproperties.java
字号:
/*
* Copyright (C) 2004 NNL Technology AB
* Visit www.infonode.net for information about InfoNode(R)
* products and how to contact NNL Technology AB.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
*/
// $Id: ViewTitleBarStateProperties.java,v 1.6 2005/12/04 13:46:04 jesper Exp $
package net.infonode.docking.properties;
import net.infonode.properties.gui.util.ComponentProperties;
import net.infonode.properties.gui.util.ShapedPanelProperties;
import net.infonode.properties.propertymap.*;
import net.infonode.properties.types.*;
import net.infonode.util.Alignment;
import javax.swing.*;
/**
* Properties and property values for a view title bar state.
*
* @author johan
* @version $Revision: 1.6 $
* @since IDW 1.4.0
*/
public class ViewTitleBarStateProperties extends PropertyMapContainer {
/**
* Property group containing all view title bar state properties.
*/
public static final PropertyMapGroup PROPERTIES = new PropertyMapGroup("View Title Bar State Properties", "");
/**
* Properties for the component
*
* @see #getComponentProperties
*/
public static final PropertyMapProperty COMPONENT_PROPERTIES = new PropertyMapProperty(PROPERTIES,
"Component Properties",
"Properties for title bar.",
ComponentProperties.PROPERTIES);
/**
* Properties for the shaped panel
*
* @see #getShapedPanelProperties
*/
public static final PropertyMapProperty SHAPED_PANEL_PROPERTIES = new PropertyMapProperty(PROPERTIES,
"Shaped Panel Properties",
"Properties for shaped title bar.",
ShapedPanelProperties.PROPERTIES);
/**
* The minimize button property values.
*
* @see #getMinimizeButtonProperties
*/
public static final PropertyMapProperty MINIMIZE_BUTTON_PROPERTIES = new PropertyMapProperty(PROPERTIES,
"Minimize Button Properties",
"The minimize button property values.",
WindowTabButtonProperties.PROPERTIES);
/**
* The minimize button property values.
*
* @see #getMinimizeButtonProperties
*/
public static final PropertyMapProperty MAXIMIZE_BUTTON_PROPERTIES = new PropertyMapProperty(PROPERTIES,
"Maximize Button Properties",
"The maximizee button property values.",
WindowTabButtonProperties.PROPERTIES);
/**
* The restore button property values.
*
* @see #getRestoreButtonProperties
*/
public static final PropertyMapProperty RESTORE_BUTTON_PROPERTIES = new PropertyMapProperty(PROPERTIES,
"Restore Button Properties",
"The restore button property values.",
WindowTabButtonProperties.PROPERTIES);
/**
* The close button property values.
*
* @see #getCloseButtonProperties
*/
public static final PropertyMapProperty CLOSE_BUTTON_PROPERTIES = new PropertyMapProperty(PROPERTIES,
"Close Button Properties",
"The close button property values.",
WindowTabButtonProperties.PROPERTIES);
/**
* The undock button property values.
*
* @see #getUndockButtonProperties
*/
public static final PropertyMapProperty UNDOCK_BUTTON_PROPERTIES = new PropertyMapProperty(PROPERTIES,
"Undock Button Properties",
"The undock button property values.",
WindowTabButtonProperties.PROPERTIES);
/**
* The dock button property values.
*
* @see #getDockButtonProperties
*/
public static final PropertyMapProperty DOCK_BUTTON_PROPERTIES = new PropertyMapProperty(PROPERTIES,
"Dock Button Properties",
"The dockbutton property values.",
WindowTabButtonProperties.PROPERTIES);
/**
* The title bar title.
*/
public static final StringProperty TITLE = new StringProperty(PROPERTIES,
"Title",
"The title bar title.",
PropertyMapValueHandler.INSTANCE);
/**
* Title visible property
*
* @see #setTitleVisible
* @see #getTitleVisible
*/
public static final BooleanProperty TITLE_VISIBLE = new BooleanProperty(PROPERTIES,
"Title Visible",
"Controls if the title should be visible or not.",
PropertyMapValueHandler.INSTANCE);
/**
* The title bar icon.
*/
public static final IconProperty ICON = new IconProperty(PROPERTIES,
"Icon",
"The title bar icon.",
PropertyMapValueHandler.INSTANCE);
/**
* Icon visible property
*
* @see #setIconVisible
* @see #getIconVisible
*/
public static final BooleanProperty ICON_VISIBLE = new BooleanProperty(PROPERTIES,
"Icon Visible",
"Controls if the icon should be visible or not.",
PropertyMapValueHandler.INSTANCE);
/**
* Icon text gap property
*
* @see #setIconTextGap
* @see #getIconTextGap
*/
public static final IntegerProperty ICON_TEXT_GAP = IntegerProperty.createPositive(PROPERTIES,
"Icon Text Gap",
"Gap in pixels between the icon and the title",
2,
PropertyMapValueHandler.INSTANCE);
/**
* Icon Text Horizontal alignment property
*
* @see #setIconTextHorizontalAlignment
* @see #getIconTextHorizontalAlignment
*/
public static final AlignmentProperty ICON_TEXT_HORIZONTAL_ALIGNMENT = new AlignmentProperty(PROPERTIES,
"Icon Text Horizontal Alignment",
"Horizontal alignment for the icon and title text.",
PropertyMapValueHandler.INSTANCE,
Alignment.getHorizontalAlignments());
/**
* Button spacing
*
* @see #setButtonSpacing
* @see #getButtonSpacing
*/
public static final IntegerProperty BUTTON_SPACING = IntegerProperty.createPositive(PROPERTIES,
"Button Spacing",
"Spacing in pixels between the buttons on the title bar",
2,
PropertyMapValueHandler.INSTANCE);
/**
* Creates an empty property object.
*/
public ViewTitleBarStateProperties() {
super(PropertyMapFactory.create(PROPERTIES));
}
/**
* Creates a property object containing the map.
*
* @param map the property map
*/
public ViewTitleBarStateProperties(PropertyMap map) {
super(map);
}
/**
* Creates a property object that inherit values from another property object.
*
* @param inheritFrom the object from which to inherit property values
*/
public ViewTitleBarStateProperties(ViewTitleBarStateProperties 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 ViewTitleBarStateProperties addSuperObject(ViewTitleBarStateProperties properties) {
getMap().addSuperMap(properties.getMap());
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -