本文整理了Java中javax.swing.JInternalFrame.getY()
方法的一些代码示例,展示了JInternalFrame.getY()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JInternalFrame.getY()
方法的具体详情如下:
包路径:javax.swing.JInternalFrame
类名称:JInternalFrame
方法名:getY
暂无
代码示例来源:origin: magefree/mage
@Override
public void iconifyFrame(JInternalFrame f) {
super.iconifyFrame(f);
if (f instanceof CardInfoWindowDialog) {
JInternalFrame.JDesktopIcon icon = f.getDesktopIcon();
icon.setBounds(f.getX() + (f.getWidth() - DESKTOP_ICON_WIDTH), f.getY(), DESKTOP_ICON_WIDTH, icon.getHeight());
}
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu
protected Rectangle getBoundsForIconOf(JInternalFrame _f)
{
JInternalFrame.JDesktopIcon icon=_f.getDesktopIcon();
Dimension ps =icon.getPreferredSize();
return new Rectangle
(_f.getX()+_f.getWidth()-ps.width,_f.getY(),ps.width,ps.height);
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu
public void mouseDragged(MouseEvent _evt)
{
if(frame_!=null)
getManager(frame_).resizeFrame
(frame_,frame_.getX(),frame_.getY(),
frame_.getWidth ()+_evt.getX()-resizeCorner_.getWidth(),
frame_.getHeight()+_evt.getY()-resizeCorner_.getHeight());
}
}
代码示例来源:origin: org.opentcs.thirdparty.jhotdraw/jhotdraw
x = allFrames[i].getX() + allFrames[i].getWidth();
if (allFrames[i].getY() + allFrames[i].getHeight() > y) {
y = allFrames[i].getY() + allFrames[i].getHeight();
代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql
/**
* Calculate the required size of this desktop pane so that
* all visible intenal frames will be fully shown.
*
* @return <TT>Dimension</TT> required size.
*/
public Dimension getRequiredSize()
{
JInternalFrame[] frames = getAllFrames();
int maxX = 0;
int maxY = 0;
for (int i = 0; i < frames.length; ++i)
{
if (frames[i].isVisible())
{
JInternalFrame frame = frames[i];
int x = frame.getX() + frame.getWidth();
if (x > maxX)
{
maxX = x;
}
int y = frame.getY() + frame.getHeight();
if (y > maxY)
{
maxY = y;
}
}
}
return new Dimension(maxX, maxY);
}
代码示例来源:origin: net.imagej/ij-ui-swing
x = allFrames[i].getX() + allFrames[i].getWidth();
if (allFrames[i].getY() + allFrames[i].getHeight() > y) {
y = allFrames[i].getY() + allFrames[i].getHeight();
代码示例来源:origin: realXuJiang/bigtable-sql
/**
* Calculate the required size of this desktop pane so that
* all visible intenal frames will be fully shown.
*
* @return <TT>Dimension</TT> required size.
*/
public Dimension getRequiredSize()
{
JInternalFrame[] frames = getAllFrames();
int maxX = 0;
int maxY = 0;
for (int i = 0; i < frames.length; ++i)
{
if (frames[i].isVisible())
{
JInternalFrame frame = frames[i];
int x = frame.getX() + frame.getWidth();
if (x > maxX)
{
maxX = x;
}
int y = frame.getY() + frame.getHeight();
if (y > maxY)
{
maxY = y;
}
}
}
return new Dimension(maxX, maxY);
}
代码示例来源:origin: org.scijava/scijava-ui-swing
x = allFrames[i].getX() + allFrames[i].getWidth();
if (allFrames[i].getY() + allFrames[i].getHeight() > y) {
y = allFrames[i].getY() + allFrames[i].getHeight();
代码示例来源:origin: fcrepo3/fcrepo
x = element.getX() + element.getWidth();
if (element.getY() + element.getHeight() > y) {
y = element.getY() + element.getHeight();
代码示例来源:origin: bcdev/beam
public void moveFrameToVisible(final JDesktopPane desktopPane, final JInternalFrame internalFrame) {
final int delta = 128;
int x = internalFrame.getX();
if (x > desktopPane.getWidth() - delta) {
x = desktopPane.getWidth() - delta;
}
if (x < 0) {
x = 0;
}
int y = internalFrame.getY();
if (y > desktopPane.getHeight() - delta) {
y = desktopPane.getHeight() - delta;
}
if (y < 0) {
y = 0;
}
internalFrame.setLocation(x, y);
}
代码示例来源:origin: org.cytoscape/swing-application-impl
nf.setNetworkViewID(view.getSUID().toString());
nf.setX(BigInteger.valueOf(iframe.getX()));
nf.setY(BigInteger.valueOf(iframe.getY()));
代码示例来源:origin: net.sf.squirrel-sql.plugins/graph
@Override
public void resizeFrame(JComponent f, int newX, int newY, int newWidth, int newHeight)
{
if (f instanceof TableFrame)
{
TableFrame tf = (TableFrame) f;
if (!_graphDesktopPane.isGroupFrame(tf))
{
_graphDesktopPane.setGroupFrame(tf);
}
Point delta = new Point(newX - f.getX(), newY - f.getY());
for (JInternalFrame current : _graphDesktopPane.getGroupFrames())
{
if (current != f)
{
current.setBounds(current.getX() + delta.x, current.getY() + delta.y, newWidth, newHeight);
}
}
}
super.resizeFrame(f, newX, newY, newWidth, newHeight);
}
代码示例来源:origin: cytoscape/application
private void setDesktopStates() throws JAXBException {
DesktopSize dSize = factory.createDesktopSize();
NetworkFrames frames = factory.createNetworkFrames();
Component[] networkFrames = Cytoscape.getDesktop().getNetworkViewManager().getDesktopPane()
.getComponents();
for (int i = 0; i < networkFrames.length; i++) {
if(networkFrames[i] instanceof JInternalFrame) {
JInternalFrame networkFrame = (JInternalFrame) networkFrames[i];
NetworkFrame frame = factory.createNetworkFrame();
frame.setFrameID(networkFrame.getTitle());
frame.setWidth(BigInteger.valueOf(networkFrame.getWidth()));
frame.setHeight(BigInteger.valueOf(networkFrame.getHeight()));
frame.setX(BigInteger.valueOf(networkFrame.getX()));
frame.setY(BigInteger.valueOf(networkFrame.getY()));
frames.getNetworkFrame().add(frame);
}
}
dSize.setHeight(BigInteger.valueOf(Cytoscape.getDesktop().getSize().height));
dSize.setWidth(BigInteger.valueOf(Cytoscape.getDesktop().getSize().width));
Desktop desktop = factory.createDesktop();
desktop.setDesktopSize(dSize);
desktop.setNetworkFrames(frames);
sState.setDesktop(desktop);
}
代码示例来源:origin: khuxtable/seaglass
public void iconifyFrame(JInternalFrame f) {
Container c = f.getParent();
boolean findNext = f.isSelected();
if (c == null) {
return;
}
if (!f.isMaximum()) {
f.setNormalBounds(f.getBounds());
}
c.remove(f);
c.repaint(f.getX(), f.getY(), f.getWidth(), f.getHeight());
try {
f.setSelected(false);
} catch (PropertyVetoException e2) {
}
// Get topmost of the remaining frames
if (findNext) {
for (Component comp : c.getComponents()) {
if (comp instanceof JInternalFrame) {
try {
((JInternalFrame) comp).setSelected(true);
} catch (PropertyVetoException e2) {
}
((JInternalFrame) comp).moveToFront();
return;
}
}
}
}
代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf
public void closeFrame(JInternalFrame f) {
boolean findNext = f.isSelected();
Container c = f.getParent();
if (findNext)
try {
f.setSelected(false);
} catch (PropertyVetoException e2) {
}
if (c != null) {
c.remove(f);
c.repaint(f.getX(), f.getY(), f.getWidth(), f.getHeight());
}
removeIconFor(f);
if (f.getNormalBounds() != null)
f.setNormalBounds(null);
if (wasIcon(f))
setWasIcon(f, null);
if (findNext) activateNextFrame(c);
}
代码示例来源:origin: com.fifesoft.rtext/fife.common
/**
* Removes the frame, and, if necessary, the
* <code>desktopIcon</code>, from its parent. This method is overridden so
* that the "next internal frame" isn't selected after this one is closed.
* @param f the <code>JInternalFrame</code> to be removed
*/
@Override
public void closeFrame(JInternalFrame f) {
Container c = f.getParent();
if (f.isSelected()) {
try {
f.setSelected(false);
} catch (PropertyVetoException e2) {
// Do nothing
}
}
if(c != null) {
c.remove(f);
c.repaint(f.getX(), f.getY(), f.getWidth(), f.getHeight());
}
removeIconFor(f);
if(f.getNormalBounds() != null)
f.setNormalBounds(null);
if(wasIcon(f))
setWasIcon(f, null);
}
代码示例来源:origin: net.sourceforge.mydoggy/mydoggy-plaf
c.repaint(f.getX(), f.getY(), f.getWidth(), f.getHeight());
try {
f.setSelected(false);
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-bu
if (!isTabbed() && getCurrentInternalFrame() != null) {
xInit = getCurrentInternalFrame().getX();
yInit = getCurrentInternalFrame().getY();
内容来源于网络,如有侵权,请联系作者删除!