本文整理汇总了Java中com.jgoodies.looks.HeaderStyle类的典型用法代码示例。如果您正苦于以下问题:Java HeaderStyle类的具体用法?Java HeaderStyle怎么用?Java HeaderStyle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HeaderStyle类属于com.jgoodies.looks包,在下文中一共展示了HeaderStyle类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: MenuBar
import com.jgoodies.looks.HeaderStyle; //导入依赖的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);
}
开发者ID:zeroc-ice,项目名称:ice-demos,代码行数:27,代码来源:MainView.java
示例2: createMenu
import com.jgoodies.looks.HeaderStyle; //导入依赖的package包/类
/**
* Populates the menu
*/
private void createMenu()
{
JMenu fileMenu = new JMenu("File");
JMenuItem exitItem = new JMenuItem("Exit");
fileMenu.add(exitItem);
menuBar.add(fileMenu);
exitItem.addActionListener(new ActionListener()
{
@Override
public void actionPerformed(ActionEvent arg0)
{
LOGGER.info("Exiting...");
JFreeStockFrame.this.dispose();
}
});
JMenu helpMenu = new JMenu("Help");
JMenuItem aboutItem = new JMenuItem("About");
helpMenu.add(aboutItem);
menuBar.add(helpMenu);
menuBar.putClientProperty(Options.HEADER_STYLE_KEY, HeaderStyle.BOTH);
setJMenuBar(menuBar);
}
开发者ID:joshpassenger,项目名称:jfreestock,代码行数:29,代码来源:JFreeStockFrame.java
示例3: installSpecialBorder
import com.jgoodies.looks.HeaderStyle; //导入依赖的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);
}
开发者ID:javachen,项目名称:IBMDataMovementTool,代码行数:31,代码来源:PlasticMenuBarUI.java
示例4: installSpecialBorder
import com.jgoodies.looks.HeaderStyle; //导入依赖的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);
}
开发者ID:javachen,项目名称:IBMDataMovementTool,代码行数:32,代码来源:PlasticToolBarUI.java
示例5: installSpecialBorder
import com.jgoodies.looks.HeaderStyle; //导入依赖的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);
}
开发者ID:javachen,项目名称:IBMDataMovementTool,代码行数:26,代码来源:WindowsToolBarUI.java
示例6: installSpecialBorder
import com.jgoodies.looks.HeaderStyle; //导入依赖的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);
}
开发者ID:javachen,项目名称:IBMDataMovementTool,代码行数:26,代码来源:WindowsXPToolBarUI.java
示例7: installSpecialBorder
import com.jgoodies.looks.HeaderStyle; //导入依赖的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);
}
开发者ID:javachen,项目名称:IBMDataMovementTool,代码行数:28,代码来源:WindowsMenuBarUI.java
示例8: is3D
import com.jgoodies.looks.HeaderStyle; //导入依赖的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: */ }
开发者ID:xiwc,项目名称:confluence.keygen,代码行数:11,代码来源:PlasticMenuBarUI.java
示例9: is3D
import com.jgoodies.looks.HeaderStyle; //导入依赖的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: */ }
开发者ID:xiwc,项目名称:confluence.keygen,代码行数:11,代码来源:PlasticToolBarUI.java
示例10: is3D
import com.jgoodies.looks.HeaderStyle; //导入依赖的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);
}
开发者ID:javachen,项目名称:IBMDataMovementTool,代码行数:16,代码来源:PlasticMenuBarUI.java
示例11: is3D
import com.jgoodies.looks.HeaderStyle; //导入依赖的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);
}
开发者ID:javachen,项目名称:IBMDataMovementTool,代码行数:16,代码来源:PlasticToolBarUI.java
示例12: createToolBar
import com.jgoodies.looks.HeaderStyle; //导入依赖的package包/类
private JToolBar createToolBar() {
JToolBar toolBar = new JToolBar();
toolBar.putClientProperty("JToolBar.isRollover", Boolean.TRUE); // hide buttons borders
toolBar.putClientProperty(Options.HEADER_STYLE_KEY, HeaderStyle.BOTH);
toolBar.setBorderPainted(false);
dataSourcesComboBox = new JComboBox();
dataSourcesComboBox.setPreferredSize(comboDim);
dataSourcesComboBox.setMinimumSize(comboDim);
dataSourcesComboBox.setMaximumSize(comboDim);
dataSourcesComboBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
//must reset parameters values because for a different data source
// we may have different values.
RuntimeParametersPanel.resetParametersValues();
}
});
toolBar.add(dataSourcesComboBox);
toolBar.add(Box.createHorizontalStrut(5));
toolBar.add(previewHTML5Action);
toolBar.add(previewFlashAction);
if (previewFlashAction.isSupported()) {
previewFlashAction.setEnabled(false);
}
toolBar.add(previewImageAction);
SwingUtil.addCustomSeparator(toolBar);
toolBar.add(applyTemplateAction);
toolBar.add(extractTemplateAction);
return toolBar;
}
开发者ID:nextreports,项目名称:nextreports-designer,代码行数:33,代码来源:ChartLayoutPanel.java
示例13: MainToolBar
import com.jgoodies.looks.HeaderStyle; //导入依赖的package包/类
public MainToolBar() {
putClientProperty("JToolBar.isRollover", Boolean.TRUE); // hide buttons borders
putClientProperty(Options.HEADER_STYLE_KEY, HeaderStyle.BOTH);
add(new NewQueryAction());
add(saveAction);
SwingUtil.addCustomSeparator(this);
add(wizardAction);
add(publishAction);
SwingUtil.addCustomSeparator(this);
add(new OpenQueryPerspectiveAction());
add(openLayoutPersAction = new OpenLayoutPerspectiveAction());
Globals.setMainToolBar(this);
newQueryActionUpdate();
actionUpdate(Globals.getConnection() != null);
enableLayoutPerspective(false);
SwingUtil.addCustomSeparator(this);
backAction = new BackToParentAction();
backAction.setEnabled(false);
add(backAction);
add(parent);
}
开发者ID:nextreports,项目名称:nextreports-designer,代码行数:29,代码来源:MainToolBar.java
示例14: MainMenuBar
import com.jgoodies.looks.HeaderStyle; //导入依赖的package包/类
public MainMenuBar() {
putClientProperty(Options.HEADER_STYLE_KEY, HeaderStyle.BOTH);
add(createFileMenu());
add(createViewsMenu());
add(createToolsMenu());
add(createHelpMenu());
actionUpdate(Globals.getConnection() != null);
Globals.setMainMenuBar(this);
}
开发者ID:nextreports,项目名称:nextreports-designer,代码行数:10,代码来源:MainMenuBar.java
示例15: VisualisationToolBar
import com.jgoodies.looks.HeaderStyle; //导入依赖的package包/类
public VisualisationToolBar() {
super();
this.setLayout(new MigLayout("alignx right, height 22!, insets 0"));
this.setFloatable(false);
this.putClientProperty(Options.HEADER_STYLE_KEY, HeaderStyle.SINGLE);
methodChoiceBox.addActionListener(this);
methodChoiceBox.setRenderer(new ComboBoxRenderer());
String width = "width 100";
this.add(methodChoiceBox, "width 200, pushx, aligny top");
this.add(helpButton, width);
this.add(maximiseButton, width);
this.add(detachButton, width);
this.add(closeButton, width);
helpButton.addActionListener(this);
maximiseButton.addActionListener(this);
detachButton.addActionListener(this);
closeButton.addActionListener(this);
helpButton.setVisible(false);
refreshVisualisationList(null, null);
// start listening
application.addClientEventListener(this);
}
开发者ID:chipster,项目名称:chipster,代码行数:33,代码来源:VisualisationToolBar.java
示例16: getButtonToolBar
import com.jgoodies.looks.HeaderStyle; //导入依赖的package包/类
/**
* When called for first time, creates button panel for the buttons of workflow -view.
*
* @return The history panel of this GraphPanel.
*/
public JToolBar getButtonToolBar() {
if (buttonToolBar == null) {
zoomInButton = ToolBarComponentFactory.createButton(false, false);
zoomInButton.setToolTipText("Zoom in");
this.initialiseToolBarButton(zoomInButton);
zoomInButton.setIcon(VisualConstants.getIcon(VisualConstants.ZOOM_IN_ICON));
zoomOutButton = ToolBarComponentFactory.createButton(false, false);
zoomOutButton.setToolTipText("Zoom out");
this.initialiseToolBarButton(zoomOutButton);
zoomOutButton.setIcon(VisualConstants.getIcon(VisualConstants.ZOOM_OUT_ICON));
autoZoomChecBbox = ToolBarComponentFactory.createCheckBox("Fit");
autoZoomChecBbox.setToolTipText("Scale workflow to show all datasets");
autoZoomChecBbox.setSelected(true);
this.initialiseToolBarButton(autoZoomChecBbox);
buttonToolBar = new JToolBar();
buttonToolBar.setFloatable(false);
buttonToolBar.setMinimumSize(new Dimension(0, 0));
buttonToolBar.putClientProperty(Options.HEADER_STYLE_KEY, HeaderStyle.SINGLE);
buttonToolBar.add(zoomInButton);
buttonToolBar.add(zoomOutButton);
buttonToolBar.add(autoZoomChecBbox);
buttonToolBar.add(Box.createHorizontalGlue());
}
return buttonToolBar;
}
开发者ID:chipster,项目名称:chipster,代码行数:36,代码来源:GraphPanel.java
示例17: getToolbarSecondStep
import com.jgoodies.looks.HeaderStyle; //导入依赖的package包/类
/**
* Gets toolbar for the second step
* @return
*/
private JToolBar getToolbarSecondStep() {
if (toolBarSecondStep == null){
toolBarSecondStep = new JToolBar();
toolBarSecondStep.setLayout(new GridLayout(1,ColumnType.values().length));
toolBarSecondStep.putClientProperty(Options.HEADER_STYLE_KEY, HeaderStyle.SINGLE);
markColumnsButtons = new HashMap<JToggleButton,ColumnType>();
for(int i = 0; i < ColumnType.values().length; i++){
if(ColumnType.values()[i].equals(ColumnType.ROW_NUMBER)){
// skip row number
continue;
}
JToggleButton button;
button = ToolBarComponentFactory.createToggleButton(
ColumnType.values()[i].toString(), //text
null, //icon
false, //left border
true); //right border
if(i == 0){
button.setSelected(true);
}
button.addActionListener(this);
markColumnsButtons.put(button,ColumnType.values()[i]);
toolBarSecondStep.add(button);
}
resetButtonSecondStep = ToolBarComponentFactory.createButton("Reset", VisualConstants.IMPORT_RESET_ICON, true, true);
resetButtonSecondStep.addActionListener(this);
toolBarSecondStep.add(resetButtonSecondStep);
this.setToolBar(toolBarSecondStep);
}
return toolBarSecondStep;
}
开发者ID:chipster,项目名称:chipster,代码行数:44,代码来源:TableInternalFrame.java
示例18: getUIDefaults
import com.jgoodies.looks.HeaderStyle; //导入依赖的package包/类
public static UIDefaults getUIDefaults() {
//Uncomment to see possible key values
//listUIDefaults();
UIDefaults defaults = new UIDefaults();
// The defauls are specified for each look n feel and color theme
if(UIManager.getLookAndFeel() instanceof Plastic3DLookAndFeel
&& Plastic3DLookAndFeel.getPlasticTheme() instanceof ExperienceBlue){
BorderUIResource emptyBorder = new BorderUIResource(BorderFactory.createEmptyBorder());
// Removes borders from menubar
defaults.put("MenuBar.border", emptyBorder);
defaults.put("SplitPaneDivider.border", emptyBorder);
defaults.put("SplitPane.border", emptyBorder);
defaults.put(Options.HEADER_STYLE_KEY, HeaderStyle.SINGLE);
defaults.put("TaskPane.titleBackgroundGradientStart",
UIManager.getColor("Panel.background"));
defaults.put("TaskPane.titleBackgroundGradientEnd",
UIManager.getColor("Panel.background"));
defaults.put("TaskPaneContainer.background", Color.white);
defaults.put("SimpleInternalFrame.activeTitleForeground", Color.white);
// Adds textarea background to white. This affects for example
// help textarea on the top right corner and affymetrix wizard
defaults.put("TextArea.background", Color.WHITE);
TEXTAREA_UNEDITABLE_BACKGROUND = UIManager.getColor("Panel.background");
} else {
// There is no specified look and feel options for this LAF. Use defaults.
}
return defaults;
}
开发者ID:chipster,项目名称:chipster,代码行数:41,代码来源:VisualConstants.java
示例19: getMenuBarHeaderStyle
import com.jgoodies.looks.HeaderStyle; //导入依赖的package包/类
public HeaderStyle getMenuBarHeaderStyle() {
return this.menuBarHeaderStyle;
}
开发者ID:javachen,项目名称:IBMDataMovementTool,代码行数:4,代码来源:Settings.java
示例20: setMenuBarHeaderStyle
import com.jgoodies.looks.HeaderStyle; //导入依赖的package包/类
public void setMenuBarHeaderStyle(HeaderStyle menuBarHeaderStyle) {
this.menuBarHeaderStyle = menuBarHeaderStyle;
}
开发者ID:javachen,项目名称:IBMDataMovementTool,代码行数:4,代码来源:Settings.java
注:本文中的com.jgoodies.looks.HeaderStyle类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论