本文整理汇总了Java中javax.swing.JToolBar.setOrientation方法的典型用法代码示例。如果您正苦于以下问题:Java JToolBar.setOrientation方法的具体用法?Java JToolBar.setOrientation怎么用?Java JToolBar.setOrientation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.JToolBar
的用法示例。
在下文中一共展示了JToolBar.setOrientation方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initComponents
import javax.swing.JToolBar; //导入方法依赖的package包/类
protected void initComponents() {
setLayout(new BorderLayout());
actionBar = new JToolBar();
actionBar.setOrientation(JToolBar.VERTICAL);
actionBar.setLayout(new BoxLayout(actionBar, BoxLayout.Y_AXIS));
actionBar.setFloatable(false);
fixSize(actionBar);
add(actionBar, BorderLayout.WEST);
// Make actionBar initially invisible. setButtons will make it visible
// if actions are defined.
// This will prevent 'blinking' of the toolbar (see IZ 233206)
actionBar.setVisible(false);
findBar = new FindBar(new FindBar.Owner() {
@Override
public void close(FindBar fb) {
findBar.getState().setVisible(false);
// OLD TerminalContainerImpl.super.remove(findBar);
componentRemove(findBar);
validate();
requestFocus();
}
});
}
示例2: setupInstance
import javax.swing.JToolBar; //导入方法依赖的package包/类
protected void setupInstance(JToolBar instance) {
super.setupInstance(instance);
instance.setBorderPainted(paintBorder);
if (margin != null) instance.setMargin(margin.createInstance());
instance.setFloatable(floatable);
instance.setOrientation(orientation);
}
示例3: addToolBar
import javax.swing.JToolBar; //导入方法依赖的package包/类
/**
* Inserts the specified toolbar into this boundary at the provided indices.
* Subclasses generally should not override this method, but may provide
* more detailed behavior by overriding the toolBarAdded() callback method
* instead.
*/
public void addToolBar(final JToolBar toolbar, final int rowIndex, final int index) {
toolbar.setOrientation(ourOrientation);
ourToolBars.add(toolbar);
toolBarAdded(toolbar, rowIndex, index);
}