本文整理汇总了Java中com.jgoodies.looks.BorderStyle类的典型用法代码示例。如果您正苦于以下问题:Java BorderStyle类的具体用法?Java BorderStyle怎么用?Java BorderStyle使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BorderStyle类属于com.jgoodies.looks包,在下文中一共展示了BorderStyle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: MenuBar
import com.jgoodies.looks.BorderStyle; //导入依赖的package包/类
private MenuBar()
{
putClientProperty(Options.HEADER_STYLE_KEY, HeaderStyle.BOTH);
putClientProperty(PlasticLookAndFeel.BORDER_STYLE_KEY, BorderStyle.SEPARATOR);
//
// File menu
//
JMenu fileMenu = new JMenu("File");
fileMenu.setMnemonic(java.awt.event.KeyEvent.VK_F);
add(fileMenu);
fileMenu.add(_login);
fileMenu.add(_logout);
if(!System.getProperty("os.name").startsWith("Mac OS"))
{
fileMenu.add(_exit);
}
//
// Help menu
//
JMenu helpMenu = new JMenu("Help");
helpMenu.setMnemonic(java.awt.event.KeyEvent.VK_H);
add(helpMenu);
helpMenu.add(_about);
}
示例2: installSpecialBorder
import com.jgoodies.looks.BorderStyle; //导入依赖的package包/类
/**
* Installs a special border, if either a look-dependent {@code BorderStyle}
* or a look-independent {@code HeaderStyle} has been specified.
* A look specific {@code BorderStyle} shadows a {@code HeaderStyle}.<p>
*
* We recommend to specify a {@code HeaderStyle}.
*/
public void installSpecialBorder() {
String suffix;
BorderStyle borderStyle = BorderStyle.from(menuBar,
PlasticLookAndFeel.BORDER_STYLE_KEY);
if (borderStyle == BorderStyle.EMPTY) {
suffix = "emptyBorder";
} else if (borderStyle == BorderStyle.ETCHED) {
suffix = "etchedBorder";
} else if (borderStyle == BorderStyle.SEPARATOR) {
suffix = "separatorBorder";
} else {
HeaderStyle headerStyle = HeaderStyle.from(menuBar);
if (headerStyle == HeaderStyle.BOTH) {
suffix = "headerBorder";
} else if (headerStyle == HeaderStyle.SINGLE && is3D()) {
suffix = "etchedBorder";
} else {
return;
}
}
LookAndFeel.installBorder(menuBar, "MenuBar." + suffix);
}
示例3: installSpecialBorder
import com.jgoodies.looks.BorderStyle; //导入依赖的package包/类
/**
* Installs a special border, if either a look-dependent
* {@code BorderStyle} or a look-independent
* {@code HeaderStyle} has been specified.
* A look specific {@code BorderStyle} shadows
* a {@code HeaderStyle}.<p>
*
* Specifying a {@code HeaderStyle} is recommend.
*/
private void installSpecialBorder() {
String suffix;
BorderStyle borderStyle =
BorderStyle.from(toolBar, PlasticLookAndFeel.BORDER_STYLE_KEY);
if (borderStyle == BorderStyle.EMPTY) {
suffix = "emptyBorder";
} else if (borderStyle == BorderStyle.ETCHED) {
suffix = "etchedBorder";
} else if (borderStyle == BorderStyle.SEPARATOR) {
suffix = "separatorBorder";
} else {
HeaderStyle headerStyle = HeaderStyle.from(toolBar);
if (headerStyle == HeaderStyle.BOTH) {
suffix = "headerBorder";
} else if (headerStyle == HeaderStyle.SINGLE && is3D()) {
suffix = "etchedBorder";
} else {
suffix = "border";
}
}
LookAndFeel.installBorder(toolBar, PROPERTY_PREFIX + suffix);
}
示例4: installSpecialBorder
import com.jgoodies.looks.BorderStyle; //导入依赖的package包/类
/**
* Installs a special border, if either a look-dependent
* {@code BorderStyle} or a look-independent
* {@code HeaderStyle} has been specified.
* A look specific BorderStyle shadows a HeaderStyle.<p>
*
* Specifying a HeaderStyle is recommend.
*/
private void installSpecialBorder() {
String suffix;
BorderStyle borderStyle =
BorderStyle.from(toolBar, WindowsLookAndFeel.BORDER_STYLE_KEY);
if (borderStyle == BorderStyle.EMPTY) {
suffix = "emptyBorder";
} else if (borderStyle == BorderStyle.SEPARATOR) {
suffix = "separatorBorder";
} else if (borderStyle == BorderStyle.ETCHED) {
suffix = "etchedBorder";
} else if (HeaderStyle.from(toolBar) == HeaderStyle.BOTH) {
suffix = "headerBorder";
} else {
return;
}
LookAndFeel.installBorder(toolBar, "ToolBar." + suffix);
}
示例5: installSpecialBorder
import com.jgoodies.looks.BorderStyle; //导入依赖的package包/类
/**
* Installs a special border, if either a look-dependent
* {@code BorderStyle} or a look-independent {@code HeaderStyle}
* has been specified. A look specific BorderStyle shadows
* a HeaderStyle.<p>
*
* Specifying a HeaderStyle is recommend.
*/
private void installSpecialBorder() {
String suffix;
BorderStyle borderStyle = BorderStyle.from(toolBar,
WindowsLookAndFeel.BORDER_STYLE_KEY);
if (borderStyle == BorderStyle.EMPTY) {
suffix = "emptyBorder";
} else if (borderStyle == BorderStyle.SEPARATOR) {
suffix = "separatorBorder";
} else if (borderStyle == BorderStyle.ETCHED) {
suffix = "etchedBorder";
} else if (HeaderStyle.from(toolBar) == HeaderStyle.BOTH) {
suffix = "headerBorder";
} else {
suffix = "border";
}
LookAndFeel.installBorder(toolBar, "ToolBar." + suffix);
}
示例6: installSpecialBorder
import com.jgoodies.looks.BorderStyle; //导入依赖的package包/类
/**
* Installs a special border, if either a look-dependent
* {@code BorderStyle} or a look-independent
* {@code HeaderStyle} has been specified.
* A look specific BorderStyle shadows
* a HeaderStyle.<p>
*
* Specifying a HeaderStyle is recommend.
*/
private void installSpecialBorder() {
String suffix;
BorderStyle borderStyle = BorderStyle.from(menuBar,
WindowsLookAndFeel.BORDER_STYLE_KEY);
if (borderStyle == BorderStyle.EMPTY) {
suffix = "emptyBorder";
} else if (borderStyle == BorderStyle.ETCHED) {
suffix = "etchedBorder";
} else if (borderStyle == BorderStyle.SEPARATOR) {
suffix = "separatorBorder";
} else if (HeaderStyle.from(menuBar) == HeaderStyle.BOTH) {
suffix = "headerBorder";
} else {
return;
}
LookAndFeel.installBorder(menuBar, "MenuBar." + suffix);
}
示例7: is3D
import com.jgoodies.looks.BorderStyle; //导入依赖的package包/类
private boolean is3D()
/* 121: */ {
/* 122:155 */ if (PlasticUtils.force3D(this.menuBar)) {
/* 123:156 */ return true;
/* 124: */ }
/* 125:157 */ if (PlasticUtils.forceFlat(this.menuBar)) {
/* 126:158 */ return false;
/* 127: */ }
/* 128:159 */ return (PlasticUtils.is3D("MenuBar.")) && (HeaderStyle.from(this.menuBar) != null) && (BorderStyle.from(this.menuBar, "Plastic.borderStyle") != BorderStyle.EMPTY);
/* 129: */ }
示例8: is3D
import com.jgoodies.looks.BorderStyle; //导入依赖的package包/类
private boolean is3D()
/* 148: */ {
/* 149:173 */ if (PlasticUtils.force3D(this.toolBar)) {
/* 150:174 */ return true;
/* 151: */ }
/* 152:175 */ if (PlasticUtils.forceFlat(this.toolBar)) {
/* 153:176 */ return false;
/* 154: */ }
/* 155:177 */ return (PlasticUtils.is3D("ToolBar.")) && (HeaderStyle.from(this.toolBar) != null) && (BorderStyle.from(this.toolBar, "Plastic.borderStyle") != BorderStyle.EMPTY);
/* 156: */ }
示例9: is3D
import com.jgoodies.looks.BorderStyle; //导入依赖的package包/类
/**
* Checks and answers if we should add a pseudo 3D effect.
*/
private boolean is3D() {
if (PlasticUtils.force3D(menuBar)) {
return true;
}
if (PlasticUtils.forceFlat(menuBar)) {
return false;
}
return PlasticUtils.is3D("MenuBar.") &&
(HeaderStyle.from(menuBar) != null) &&
(BorderStyle.from(menuBar, PlasticLookAndFeel.BORDER_STYLE_KEY)
!= BorderStyle.EMPTY);
}
示例10: is3D
import com.jgoodies.looks.BorderStyle; //导入依赖的package包/类
/**
* Checks and answers if we should add a pseudo 3D effect.
*/
private boolean is3D() {
if (PlasticUtils.force3D(toolBar)) {
return true;
}
if (PlasticUtils.forceFlat(toolBar)) {
return false;
}
return PlasticUtils.is3D(PROPERTY_PREFIX)
&& (HeaderStyle.from(toolBar) != null)
&& (BorderStyle.from(toolBar, PlasticLookAndFeel.BORDER_STYLE_KEY)
!= BorderStyle.EMPTY);
}
示例11: getMenuBarPlasticBorderStyle
import com.jgoodies.looks.BorderStyle; //导入依赖的package包/类
public BorderStyle getMenuBarPlasticBorderStyle() {
return this.menuBarPlasticBorderStyle;
}
示例12: setMenuBarPlasticBorderStyle
import com.jgoodies.looks.BorderStyle; //导入依赖的package包/类
public void setMenuBarPlasticBorderStyle(
BorderStyle menuBarPlasticBorderStyle) {
this.menuBarPlasticBorderStyle = menuBarPlasticBorderStyle;
}
示例13: getMenuBarWindowsBorderStyle
import com.jgoodies.looks.BorderStyle; //导入依赖的package包/类
public BorderStyle getMenuBarWindowsBorderStyle() {
return this.menuBarWindowsBorderStyle;
}
示例14: setMenuBarWindowsBorderStyle
import com.jgoodies.looks.BorderStyle; //导入依赖的package包/类
public void setMenuBarWindowsBorderStyle(
BorderStyle menuBarWindowsBorderStyle) {
this.menuBarWindowsBorderStyle = menuBarWindowsBorderStyle;
}
示例15: getToolBarPlasticBorderStyle
import com.jgoodies.looks.BorderStyle; //导入依赖的package包/类
public BorderStyle getToolBarPlasticBorderStyle() {
return this.toolBarPlasticBorderStyle;
}