本文整理了Java中javax.swing.JMenu.getHeight()
方法的一些代码示例,展示了JMenu.getHeight()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JMenu.getHeight()
方法的具体详情如下:
包路径:javax.swing.JMenu
类名称:JMenu
方法名:getHeight
暂无
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@ScriptFunction(jsDoc = HEIGHT_JSDOC)
@Override
public int getHeight() {
return super.getHeight();
}
代码示例来源:origin: de.sciss/submin
@Override
protected void paintBackground(Graphics2D g2d, boolean selected) {
if (component.getParent() instanceof JPopupMenu) {
// super.paintBackground ( g2d, selected );
if (selected) {
g2d.setPaint(new GradientPaint(0, 0, selectedTopBg, 0, component.getHeight(), selectedBottomBg));
g2d.fillRect(0, 0, component.getWidth(), component.getHeight());
}
} else {
if (component.isEnabled() && (selected || mouseover)) {
// LafUtils.drawWebStyle ( g2d, component, shadeColor, shadeWidth, round, component.isEnabled (),
// !selected && mouseover, selected ? StyleConstants.averageBorderColor : StyleConstants.borderColor );
// final Color borderColor = selected ? StyleConstants.averageBorderColor : StyleConstants.borderColor;
// final float opacity = mouseover ? getHoverOpacity () : 1f;
final float opacity = selected ? 1f : getHoverOpacity();
final Paint bgPaint = new GradientPaint(0, 0, selectedTopBg, 0, component.getHeight(), selectedBottomBg);
drawShape(g2d, component, shadeColor, shadeWidth, round, component.isEnabled(),
borderColor, borderColor, bgPaint, opacity);
}
}
}
代码示例来源:origin: com.jidesoft/jide-oss
private boolean isClickOnButton(MouseEvent e, JMenu menu) {
if (((JideSplitButton) menu).isAlwaysDropdown()) {
return false;
}
boolean clickOnDropDown = false;
int size = ((JMenu) menuItem).isTopLevelMenu() ? _splitButtonMargin : _splitButtonMarginOnMenu;
if (JideSwingUtilities.getOrientationOf(menuItem) == SwingConstants.HORIZONTAL) {
if (e.getPoint().getX() < menu.getWidth() - size) {
clickOnDropDown = true;
}
}
else {
if (e.getPoint().getY() < menu.getHeight() - size) {
clickOnDropDown = true;
}
}
return clickOnDropDown;
}
代码示例来源:origin: com.jidesoft/jide-oss
private boolean isClickOnButton(MouseEvent e, JMenu menu) {
if (((JideSplitButton) menu).isAlwaysDropdown()) {
return false;
}
boolean clickOnDropDown = false;
int size = ((JMenu) menuItem).isTopLevelMenu() ? _splitButtonMargin : _splitButtonMarginOnMenu;
if (JideSwingUtilities.getOrientationOf(menuItem) == SwingConstants.HORIZONTAL) {
if (e.getPoint().getX() < menu.getWidth() - size) {
clickOnDropDown = true;
}
}
else {
if (e.getPoint().getY() < menu.getHeight() - size) {
clickOnDropDown = true;
}
}
return clickOnDropDown;
}
代码示例来源:origin: com.jidesoft/jide-oss
int size = 27;
if (JideSwingUtilities.getOrientationOf(menuItem) == SwingConstants.HORIZONTAL) {
if (e.getPoint().getY() < menu.getHeight() - size) {
clickOnDropDown = true;
if (e.getPoint().getY() < menu.getHeight() - size) {
clickOnDropDown = true;
if (e.getPoint().getY() < menu.getHeight() - size) {
clickOnDropDown = true;
内容来源于网络,如有侵权,请联系作者删除!