There are 2 code examples for org.eclipse.swt.graphics.Region.
The API names are highlighted below.
You can use
button
to vote the code example(s) you like. The best code example will be ranked first next time. Thanks a lot for your feedback.
Project Name: rssowl.ui Package: org.rssowl.ui.internal
Source Code: OwlUI.java (Click to view .java file)
Method Code:
/**
* Custom Owner Draw helper to expand a drawn region over a scrollable item.
* @param event the erase event.
* @param scrollable the scrollable to paint on.
* @param gc the gc to paint on.
* @param area the drawable area.
*/
public static void codExpandRegion(Event event,Scrollable scrollable,GC gc,Rectangle area){
int columnCount;
if (scrollable instanceof Table) columnCount=((Table)scrollable).getColumnCount();
else columnCount=((Tree)scrollable).getColumnCount();
if (event.index == columnCount - 1 || columnCount == 0) {
int width=area.x + area.width - event.x;
if (width > 0) {
Region region=new Region();
gc.getClipping(region);
region.add(event.x,event.y,width,event.height);
gc.setClipping(region);
region.dispose();
}
}
}
Project Name: rssowl.ui Package: org.rssowl.ui.internal.notifier
Source Code: NotificationPopup.java (Click to view .java file)
Method Code:
/**
* The actual implementation of close().
* @return <code>true</code> if the window is (or was already) closed, and
* <code>false</code> if it is still open
*/
protected boolean doClose(){
fResources.dispose();
if (fLastUsedRegion != null) fLastUsedRegion.dispose();
if (fTitleBgImage != null) fTitleBgImage.dispose();
if (fFooterBgImage != null) fFooterBgImage.dispose();
if (fInitialItems != null) fInitialItems.clear();
return super.close();
}