本文整理了Java中javax.swing.JToggleButton.getSize()
方法的一些代码示例,展示了JToggleButton.getSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JToggleButton.getSize()
方法的具体详情如下:
包路径:javax.swing.JToggleButton
类名称:JToggleButton
方法名:getSize
暂无
代码示例来源:origin: xyz.cofe/docking-frames-ext-toolbar
@Override
public Rectangle getButton(){
Point location = new Point( 0, 0 );
SwingUtilities.convertPointToScreen( location, toggle );
return new Rectangle( location, toggle.getSize() );
}
代码示例来源:origin: org.nuiton.jaxx/jaxx-widgets-i18n
@Override
public void run() {
ui.getPopup().pack();
JToggleButton invoker = ui.getButton();
Dimension dim = ui.getPopup().getPreferredSize();
Dimension invokerDim = invoker.getSize();
ui.getPopup().show(invoker, (int) (invokerDim.getWidth() - dim.getWidth()), invoker.getHeight());
// getPopup().setVisible(true);
}
};
代码示例来源:origin: org.nuiton.jaxx/jaxx-widgets
@Override
public void run() {
ui.getPopup().pack();
JToggleButton invoker = ui.getButton();
Dimension dim = ui.getPopup().getPreferredSize();
Dimension invokerDim = invoker.getSize();
ui.getPopup().show(invoker, (int) (invokerDim.getWidth() - dim.getWidth()), invoker.getHeight());
// getPopup().setVisible(true);
}
};
代码示例来源:origin: org.jclarion/clarion-runtime
@Override
protected void handleAWTChange(int indx, ClarionObject value) {
if (indx==Prop.TEXT) {
JToggleButton b = button;
if (b==null) return;
configureButton();
Dimension size = b.getSize();
Dimension psize = b.getPreferredSize();
if (psize.width>size.width) {
b.setSize(psize.width,size.height);
}
}
super.handleAWTChange(indx, value);
}
代码示例来源:origin: org.jclarion/clarion-runtime
@Override
protected void handleAWTChange(int indx,ClarionObject value)
{
if (indx==Prop.ICON || indx==Prop.TEXT) {
JToggleButton c = check;
if (c == null) return;
switch (indx) {
case Prop.ICON:
check.setIcon(getIcon(value.toString(), 16, 16));
check.setBorder(null);
check.setSize(20, 20);
case Prop.TEXT:
configureButton();
{
Dimension ps = check.getPreferredSize();
Dimension s = check.getSize();
if (ps.width > s.width || ps.height > s.height) {
if (ps.width > s.width)
s.width = ps.width;
if (ps.height > s.height)
s.height = ps.height;
check.setSize(s);
}
}
}
return;
}
super.handleAWTChange(indx, value);
}
内容来源于网络,如有侵权,请联系作者删除!