.... private Composite dataCalcComposite; public void createContents() { dataCalcComposite = new Composite(shell, SWT.NONE); dataCalcComposite.setBounds(0, 10, 279, 146); } public void repositionObjects() { if (dataCalcComposite != null) { dataCalcComposite.setLocation(50, 10) } } ....
private void setPaneLocation(Composite someShell) { Composite clientComp = getShellClientComposite(); if (clientComp == null || clientComp.isDisposed()) return; Rectangle caRect = getShellClientComposite().getBounds(); // NOTE: always starts in the persisted (or default) size Point paneSize = getHostPane().getSize(); // Ensure it's not clipped if (paneSize.x > caRect.width) paneSize.x = caRect.width; if (paneSize.y > caRect.height) paneSize.y = caRect.height; if (minimizedElement.getTags().contains(IPresentationEngine.ORIENTATION_HORIZONTAL)) paneSize.x = caRect.width; if (minimizedElement.getTags().contains(IPresentationEngine.ORIENTATION_VERTICAL)) paneSize.y = caRect.height; Point loc = new Point(0, 0); if (isFixed(SWT.LEFT)) loc.x = caRect.x; else loc.x = (caRect.x + caRect.width) - paneSize.x; if (isFixed(SWT.TOP)) loc.y = caRect.y; else loc.y = (caRect.y + caRect.height) - paneSize.y; someShell.setSize(paneSize); someShell.setLocation(loc); }
int vPageEnd = contentY - windowY; if(locationY >= vPageEnd){ locationY = vPageEnd ;} table.setLocation(5, - locationY); // 5 is left margin. int hPageEnd = contentX - windowX; if(locationX >= hPageEnd){ locationX = hPageEnd ;} table.setLocation(-locationX+5, tableheader.getSize().y); // 5 is left margin. if(locationY >= vPageEnd) {locationY = vPageEnd;} if(locationX >= hPageEnd) {locationX = hPageEnd;} if(e.widget.equals(vBar)){table.setLocation(5,-locationY);} else {table.setLocation(-locationX,tableheader.getSize().y);}
button.setBackground(fScroller.getBackground()); button.setSize(fIconSize + 4, fIconSize + 4); button.setLocation((index * (fIconSize + spacing) + spacing - fSpacing), 2); button.addPaintListener(e -> { if (fSelectedProvider == provider) {