本文整理了Java中javax.swing.SwingUtilities.computeUnion()
方法的一些代码示例,展示了SwingUtilities.computeUnion()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SwingUtilities.computeUnion()
方法的具体详情如下:
包路径:javax.swing.SwingUtilities
类名称:SwingUtilities
方法名:computeUnion
暂无
代码示例来源:origin: net.sf.squirrel-sql.thirdparty-non-maven/napkinlaf
/**
* This is a copy of the code from the superclass because I need to expand
* the clip rectangle -- the slider draws a bit outside of its area because
* the lines are curved. I wish there were a better way rather than the
* copy/paste that caused this, but so far there isn't.
* <p/>
* {@inheritDoc}
*/
@Override
public void setThumbLocation(int x, int y) {
Rectangle unionRect = new Rectangle(thumbRect);
thumbRect.setLocation(x, y);
SwingUtilities.computeUnion(thumbRect.x, thumbRect.y, thumbRect.width,
thumbRect.height, unionRect);
slider.repaint(unionRect.x - 3, unionRect.y - 3, unionRect.width + 6,
unionRect.height + 6);
}
代码示例来源:origin: org.gephi/ui-components
/**
* Sets the location of the upper thumb, and repaints the slider. This is
* called when the upper thumb is dragged to repaint the slider. The
* <code>setThumbLocation()</code> method performs the same task for the
* lower thumb.
*/
private void setUpperThumbLocation(int x, int y) {
Rectangle upperUnionRect = new Rectangle();
upperUnionRect.setBounds(upperThumbRect);
upperThumbRect.setLocation(x, y);
SwingUtilities.computeUnion(upperThumbRect.x, upperThumbRect.y, upperThumbRect.width, upperThumbRect.height, upperUnionRect);
slider.repaint(upperUnionRect.x, upperUnionRect.y, upperUnionRect.width, upperUnionRect.height);
}
代码示例来源:origin: igvteam/igv
/**
* Sets the location of the upper thumb, and repaints the slider. This is
* called when the upper thumb is dragged to repaint the slider. The
* <code>setThumbLocation()</code> method performs the same task for the
* lower thumb.
*/
private void setUpperThumbLocation(int x, int y) {
Rectangle upperUnionRect = new Rectangle();
upperUnionRect.setBounds(upperThumbRect);
upperThumbRect.setLocation(x, y);
SwingUtilities.computeUnion(upperThumbRect.x, upperThumbRect.y, upperThumbRect.width, upperThumbRect.height, upperUnionRect);
slider.repaint(upperUnionRect.x, upperUnionRect.y, upperUnionRect.width, upperUnionRect.height);
}
代码示例来源:origin: org.gephi/ui-components
/**
* Sets the location of the upper thumb, and repaints the slider. This is
* called when the upper thumb is dragged to repaint the slider. The
* <code>setThumbLocation()</code> method performs the same task for the
* lower thumb.
*/
private void setUpperThumbLocation(int x, int y) {
Rectangle upperUnionRect = new Rectangle();
upperUnionRect.setBounds(upperThumbRect);
upperThumbRect.setLocation(x, y);
SwingUtilities.computeUnion(upperThumbRect.x, upperThumbRect.y, upperThumbRect.width, upperThumbRect.height, upperUnionRect);
slider.repaint(upperUnionRect.x, upperUnionRect.y, upperUnionRect.width, upperUnionRect.height);
}
代码示例来源:origin: com.synaptix/SynaptixSwing
public void setThumbLocation(int x, int y) {
unionRect.setBounds(thumbRect);
thumbRect.setLocation(x, y);
SwingUtilities.computeUnion(thumbRect.x, thumbRect.y, thumbRect.width,
thumbRect.height, unionRect);
slider.repaint(unionRect.x, unionRect.y, unionRect.width,
unionRect.height);
}
代码示例来源:origin: com.synaptix/SynaptixSwing
public void setThumbLocation(int x, int y) {
unionRect.setBounds(thumbRect);
thumbRect.setLocation(x, y);
SwingUtilities.computeUnion(thumbRect.x, thumbRect.y, thumbRect.width,
thumbRect.height, unionRect);
slider.repaint(unionRect.x, unionRect.y, unionRect.width,
unionRect.height);
}
代码示例来源:origin: net.sf.tinylaf/tinylaf
rect = SwingUtilities.computeUnion(iconRect.x, iconRect.y, iconRect.width, iconRect.height, rect);
代码示例来源:origin: net.sf.tinylaf/tinylaf
rect = SwingUtilities.computeUnion(iconRect.x, iconRect.y, iconRect.width, iconRect.height, rect);
代码示例来源:origin: com.jidesoft/jide-oss
r = SwingUtilities.computeUnion(iconRect.x,
iconRect.y,
iconRect.width,
代码示例来源:origin: com.jidesoft/jide-oss
r = SwingUtilities.computeUnion(iconRect.x,
iconRect.y,
iconRect.width,
代码示例来源:origin: com.jidesoft/jide-oss
r = SwingUtilities.computeUnion(iconRect.x,
iconRect.y,
iconRect.width,
代码示例来源:origin: khuxtable/seaglass
r = SwingUtilities.computeUnion(iconRect.x, iconRect.y, iconRect.width, iconRect.height, r);
内容来源于网络,如有侵权,请联系作者删除!