本文整理了Java中javax.swing.JToolBar.getHeight()
方法的一些代码示例,展示了JToolBar.getHeight()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JToolBar.getHeight()
方法的具体详情如下:
包路径:javax.swing.JToolBar
类名称:JToolBar
方法名:getHeight
暂无
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@ScriptFunction(jsDoc = HEIGHT_JSDOC)
@Override
public int getHeight() {
return super.getHeight();
}
代码示例来源:origin: joel-costigliola/assertj-swing
/**
* <p>
* Returns the point where to grab the given {@code JToolBar}.
* </p>
*
* <p>
* <b>Note:</b> This method is accessed in the current executing thread. Such thread may or may not be the event
* dispatch thread (EDT). Client code must call this method from the EDT.
* </p>
*
* @param toolBar the target {@code JToolBar}.
* @return the point where to grab the given {@code JToolBar}.
*/
@RunsInCurrentThread
@Nonnull public Point pointToGrab(@Nonnull JToolBar toolBar) {
Insets insets = toolBar.getInsets();
int width = toolBar.getWidth();
int height = toolBar.getHeight();
if (max(max(max(insets.left, insets.top), insets.right), insets.bottom) == insets.left) {
return new Point(insets.left / 2, height / 2);
}
if (max(max(insets.top, insets.right), insets.bottom) == insets.top) {
return new Point(width / 2, insets.top / 2);
}
if (max(insets.right, insets.bottom) == insets.right) {
return new Point(width - insets.right / 2, height / 2);
}
return new Point(width / 2, height - insets.bottom / 2);
}
代码示例来源:origin: jpcsp/jpcsp
@Override
public void setDisplayMinimumSize(int width, int height) {
Dimension dim = getDimensionFromDisplay(width, height);
dim.height += mainToolBar.getHeight();
dim.height += MenuBar.getHeight();
setMinimumSize(dim);
}
代码示例来源:origin: abbot/abbot
? bar.getHeight() : bar.getWidth();
if (BorderLayout.NORTH.equals(constraint)) {
x = dock.getWidth()/2;
代码示例来源:origin: joel-costigliola/assertj-swing
int offset = isHorizontal(toolBar) ? toolBar.getHeight() : toolBar.getWidth();
Dimension dockSize = dock.getSize();
if (NORTH.equals(constraint)) {
代码示例来源:origin: igniterealtime/Spark
mainPanel.add(layoutPanel, new GridBagConstraints(0, 0, 1, 1, 0.5, 0.5, GridBagConstraints.NORTH, GridBagConstraints.NONE, new Insets(SparkManager.getMainWindow().getTopToolBar().getHeight()+SparkManager.getWorkspace().getStatusBar().getHeight() + 47, 1, 5, 1), 200, 0));
mainPanel.setOpaque(false);
代码示例来源:origin: khuxtable/seaglass
contentRect.y = 0;
contentRect.width = tb.getWidth() - handleWidth;
contentRect.height = tb.getHeight();
int baseH = tb.getHeight() - insets.top - insets.bottom;
contentRect.y = handleHeight;
contentRect.width = tb.getWidth();
contentRect.height = tb.getHeight() - handleHeight;
if (glueCount > 0) {
int minHeight = minimumLayoutSize(parent).height;
extraSpacePerGlue = (tb.getHeight() - minHeight) / glueCount;
if (extraSpacePerGlue < 0) extraSpacePerGlue = 0;
内容来源于网络,如有侵权,请联系作者删除!