private Rectangle getTabAreaRect(CTabFolder theCTF) { Rectangle ctfBounds = theCTF.getBounds(); ctfBounds.height = theCTF.getTabHeight(); Rectangle displayBounds = Display.getCurrent().map(theCTF.getParent(), null, ctfBounds); return displayBounds; }
private Rectangle getTabAreaRect(CTabFolder theCTF) { Rectangle ctfBounds = theCTF.getBounds(); ctfBounds.height = theCTF.getTabHeight(); Rectangle displayBounds = Display.getCurrent().map(theCTF.getParent(), null, ctfBounds); return displayBounds; }
public void getLocation(AccessibleControlEvent e) { Rectangle location = null; Point pt = null; int childID = e.childID; if (childID == ACC.CHILDID_SELF) { location = getBounds(); pt = getParent().toDisplay(location.x, location.y); } else { if (childID >= 0 && childID < items.length && items[childID].showing) { location = items[childID].getBounds(); } if (location != null) { pt = toDisplay(location.x, location.y); } } if (location != null && pt != null) { e.x = pt.x; e.y = pt.y; e.width = location.width; e.height = location.height; } }
@Override public void getLocation(AccessibleControlEvent e) { Rectangle location = null; Point pt = null; int childID = e.childID; if (childID == ACC.CHILDID_SELF) { location = getBounds(); pt = getParent().toDisplay(location.x, location.y); } else { if (childID >= 0 && childID < items.length && items[childID].showing) { location = items[childID].getBounds(); } if (location != null) { pt = toDisplay(location.x, location.y); } } if (location != null && pt != null) { e.x = pt.x; e.y = pt.y; e.width = location.width; e.height = location.height; } }
@Override public void getLocation(AccessibleControlEvent e) { Rectangle location = null; Point pt = null; int childID = e.childID; if (childID == ACC.CHILDID_SELF) { location = getBounds(); pt = getParent().toDisplay(location.x, location.y); } else { if (childID >= 0 && childID < items.length && items[childID].showing) { location = items[childID].getBounds(); } if (location != null) { pt = toDisplay(location.x, location.y); } } if (location != null && pt != null) { e.x = pt.x; e.y = pt.y; e.width = location.width; e.height = location.height; } }
@Override public void getLocation(AccessibleControlEvent e) { Rectangle location = null; Point pt = null; int childID = e.childID; if (childID == ACC.CHILDID_SELF) { location = getBounds(); pt = getParent().toDisplay(location.x, location.y); } else { if (childID >= 0 && childID < items.length && items[childID].showing) { location = items[childID].getBounds(); } if (location != null) { pt = toDisplay(location.x, location.y); } } if (location != null && pt != null) { e.x = pt.x; e.y = pt.y; e.width = location.width; e.height = location.height; } }
@Override public void getLocation(AccessibleControlEvent e) { Rectangle location = null; Point pt = null; int childID = e.childID; if (childID == ACC.CHILDID_SELF) { location = getBounds(); pt = getParent().toDisplay(location.x, location.y); } else { if (childID >= 0 && childID < items.length && items[childID].showing) { location = items[childID].getBounds(); } if (location != null) { pt = toDisplay(location.x, location.y); } } if (location != null && pt != null) { e.x = pt.x; e.y = pt.y; e.width = location.width; e.height = location.height; } }
e.doit = true; e.detail = SWT.TRAVERSE_NONE; Control control = newContainer.getParent(); do { if (control.traverse(detail))
private void minimize() { minimized = true; tabFolder.setMinimized(true); CTabItem[] items = tabFolder.getItems(); String tt = MessageText.getString("label.click.to.restore"); for (int i = 0; i < items.length; i++) { CTabItem tabItem = items[i]; Utils.setTT(tabItem,tt); Control control = tabItem.getControl(); if (control != null && !control.isDisposed()) { tabItem.getControl().setVisible(false); } } tabFolder.getParent().notifyListeners(SWT.Resize, null); showEntry(null); ConfigurationManager configMan = ConfigurationManager.getInstance(); configMan.setParameter(props_prefix + ".subViews.minimized", true); }
void drawCorners(GC gc, Rectangle bounds) { Color bg = gc.getBackground(); Color fg = gc.getForeground(); Color toFill = parent.getParent().getBackground(); gc.setAlpha(255); gc.setBackground(toFill); gc.setForeground(toFill); int radius = cornerSize / 2 + 1; int leftX = bounds.x - 1; int topY = bounds.y - 1; int rightX = bounds.x + bounds.width; int bottomY = bounds.y + bounds.height; drawCutout(gc, leftX, topY, radius, CirclePart.LEFT_TOP); drawCutout(gc, rightX, topY, radius, CirclePart.RIGHT_TOP); drawCutout(gc, leftX, bottomY, radius, CirclePart.LEFT_BOTTOM); drawCutout(gc, rightX, bottomY, radius, CirclePart.RIGHT_BOTTOM); gc.setBackground(bg); gc.setForeground(fg); }
tabFolder.getParent().notifyListeners(SWT.Resize, null);
outerRGB = parent.getParent().getBackground().getRGB(); if (outerRGB != null) { RGB from = lineRGB;
outerRGB = parent.getParent().getBackground().getRGB(); if (outerRGB != null) { RGB from = lineRGB;
outerRGB = parent.getParent().getBackground().getRGB(); if (outerRGB != null) { RGB from = lineRGB;
outerRGB = parent.getParent().getBackground().getRGB(); if (outerRGB != null) { RGB from = lineRGB;
outerRGB = parent.getParent().getBackground().getRGB(); if (outerRGB != null) { RGB from = lineRGB;
@Override public void renderInitialization( CTabFolder folder ) throws IOException { RemoteObject remoteObject = createRemoteObject( folder, TYPE ); remoteObject.setHandler( new CTabFolderOperationHandler( folder ) ); remoteObject.set( "parent", WidgetUtil.getId( folder.getParent() ) ); remoteObject.set( "style", createJsonArray( getStyles( folder, ALLOWED_STYLES ) ) ); JsonArray toolTipTexts = new JsonArray() .add( SWT.getMessage( "SWT_Minimize" ) ) .add( SWT.getMessage( "SWT_Maximize" ) ) .add( SWT.getMessage( "SWT_Restore" ) ) .add( SWT.getMessage( "SWT_ShowList" ) ) .add( SWT.getMessage( "SWT_Close" ) ); remoteObject.set( PROP_TOOLTIP_TEXTS, toolTipTexts ); // Always listen for Selection and Folder. // Currently required for item's control visibility and bounds update. remoteObject.listen( PROP_SELECTION_LISTENER, true ); // Currently required for always sending close/showList notify operations. remoteObject.listen( PROP_FOLDER_LISTENER, true ); }
private void ensureComposite(MArea areaModel) { if (areaModel.getWidget() instanceof CTabFolder) { CTabFolder ctf = (CTabFolder) areaModel.getWidget(); CTabItem cti = ctf.getItem(0); Composite innerComp = (Composite) cti.getControl(); innerComp.setParent(ctf.getParent()); cti.setControl(null); // OK now copy over the min/max state of the area stack to the // remaining part stack List<MPartStack> stacks = modelService.findElements(areaModel, null, MPartStack.class); for (MPartStack stack : stacks) { if (stack.isToBeRendered() && stack.getWidget() instanceof CTabFolder) { CTabFolder stackCTF = (CTabFolder) stack.getWidget(); stackCTF.setMinimizeVisible(ctf.getMinimizeVisible()); stackCTF.setMaximizeVisible(ctf.getMaximizeVisible()); stackCTF.setMinimized(ctf.getMinimized()); stackCTF.setMaximized(ctf.getMaximized()); } } ctf.setData(AbstractPartRenderer.OWNING_ME, null); ctf.dispose(); bindWidget(areaModel, innerComp); innerComp.setVisible(true); innerComp.requestLayout(); } }
clientBounds = Display.getCurrent().map(dropCTF, null, clientBounds); ctfBounds = dropCTF.getBounds(); ctfBounds = Display.getCurrent().map(dropCTF.getParent(), null, ctfBounds);
private void ensureComposite(MArea areaModel) { if (areaModel.getWidget() instanceof CTabFolder) { CTabFolder ctf = (CTabFolder) areaModel.getWidget(); CTabItem cti = ctf.getItem(0); Composite innerComp = (Composite) cti.getControl(); innerComp.setParent(ctf.getParent()); cti.setControl(null); // OK now copy over the min/max state of the area stack to the // remaining part stack List<MPartStack> stacks = modelService.findElements(areaModel, null, MPartStack.class, null); for (MPartStack stack : stacks) { if (stack.isToBeRendered() && stack.getWidget() instanceof CTabFolder) { CTabFolder stackCTF = (CTabFolder) stack.getWidget(); stackCTF.setMinimizeVisible(ctf.getMinimizeVisible()); stackCTF.setMaximizeVisible(ctf.getMaximizeVisible()); stackCTF.setMinimized(ctf.getMinimized()); stackCTF.setMaximized(ctf.getMaximized()); } } ctf.setData(AbstractPartRenderer.OWNING_ME, null); ctf.dispose(); bindWidget(areaModel, innerComp); innerComp.setVisible(true); innerComp.getParent().layout(true, true); } }