Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 184725 Details for
Bug 332010
view Facet customizations on NatTable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch
Bug 332010.patch (text/plain), 22.61 KB, created by
Nicolas Bros
on 2010-12-07 11:02:49 EST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Nicolas Bros
Created:
2010-12-07 11:02:49 EST
Size:
22.61 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.emf.facet.infra.browser >Index: src/org/eclipse/emf/facet/infra/browser/editors/EcoreBrowser.java >=================================================================== >--- src/org/eclipse/emf/facet/infra/browser/editors/EcoreBrowser.java (revision 125) >+++ src/org/eclipse/emf/facet/infra/browser/editors/EcoreBrowser.java (working copy) >@@ -880,11 +880,10 @@ > if (externalResource != null) { > directReferencedResources.add(externalResource); > } else { >- Logger >- .logError( >- "Failed to load an external element: " + external.eClass().getName() //$NON-NLS-1$ >- + " " + EcoreUtil.getURI(external), //$NON-NLS-1$ >- BrowserPlugin.getPlugin()); >+ Logger.logError( >+ "Failed to load an external element: " + external.eClass().getName() //$NON-NLS-1$ >+ + " " + EcoreUtil.getURI(external), //$NON-NLS-1$ >+ BrowserPlugin.getPlugin()); > } > } > } >@@ -987,7 +986,8 @@ > this.customTreePainter = new CustomTreePainter(this.fTree, > this.browserConfiguration.getAppearanceConfiguration()); > // create a tooltip to show facet names >- FacetTooltip.create(this.fTree, this.customTreePainter); >+ FacetTooltip.create(this.fTree, this.customTreePainter, >+ this.browserConfiguration.getAppearanceConfiguration()); > > this.treeViewer = new TreeViewer(this.fTree); > // speeds up all operations on a big model >@@ -2412,9 +2412,8 @@ > basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true)); > return basicDiagnostic; > } else if (exception != null) { >- return new BasicDiagnostic(Diagnostic.ERROR, BrowserPlugin.PLUGIN_ID, 0, >- NLS.bind(Messages.UI_ErrorFile_message, resource.getURI()), >- new Object[] { exception }); >+ return new BasicDiagnostic(Diagnostic.ERROR, BrowserPlugin.PLUGIN_ID, 0, NLS.bind( >+ Messages.UI_ErrorFile_message, resource.getURI()), new Object[] { exception }); > } else { > return Diagnostic.OK_INSTANCE; > } >@@ -2456,7 +2455,7 @@ > commandStack.addCommandStackListener(new CommandStackListener() { > public void commandStackChanged(final EventObject event) { > Composite composite = getParentComposite(); >- if(composite.isDisposed()) { >+ if (composite.isDisposed()) { > return; > } > composite.getDisplay().asyncExec(new Runnable() { >Index: src/org/eclipse/emf/facet/infra/browser/editors/FacetTooltip.java >=================================================================== >--- src/org/eclipse/emf/facet/infra/browser/editors/FacetTooltip.java (revision 125) >+++ src/org/eclipse/emf/facet/infra/browser/editors/FacetTooltip.java (working copy) >@@ -14,8 +14,9 @@ > > import org.eclipse.emf.ecore.EObject; > import org.eclipse.emf.facet.infra.browser.BrowserPlugin; >+import org.eclipse.emf.facet.infra.browser.uicore.internal.AppearanceConfiguration; > import org.eclipse.emf.facet.infra.browser.uicore.internal.CustomTreePainter; >-import org.eclipse.emf.facet.infra.browser.uicore.internal.CustomTreePainter.FacetToPaint; >+import org.eclipse.emf.facet.infra.browser.uicore.internal.FacetToPaint; > import org.eclipse.emf.facet.infra.browser.uicore.internal.model.ModelElementItem; > import org.eclipse.emf.facet.infra.facet.Facet; > import org.eclipse.swt.SWT; >@@ -40,12 +41,16 @@ > * Windows Vista or 7 > */ > public final class FacetTooltip { >- >- // TODO: extend org.eclipse.emf.facet.infra.common.ui.internal.controls.Tooltip >+ >+ // TODO: extend >+ // org.eclipse.emf.facet.infra.common.ui.internal.controls.Tooltip > > private static final String TREEITEM_DATA_KEY = "_TREEITEM"; //$NON-NLS-1$ >+ private static AppearanceConfiguration fApearanceConfiguration; > >- public static FacetTooltip create(final Tree tree, final CustomTreePainter customTreePainter) { >+ public static FacetTooltip create(final Tree tree, final CustomTreePainter customTreePainter, >+ final AppearanceConfiguration appearanceConfiguration) { >+ FacetTooltip.fApearanceConfiguration = appearanceConfiguration; > return new FacetTooltip(tree, customTreePainter); > } > >@@ -87,9 +92,11 @@ > Rectangle bounds = item.getBounds(); > int maxX = tree.getClientArea().width > + tree.getHorizontalBar().getSelection(); >- List<FacetToPaint> facetsToPaint = customTreePainter >+ List<FacetToPaint> facetsToPaint = CustomTreePainter > .getFacetsToPaintFor(eObject, bounds.x, bounds.width, bounds.y, >- bounds.height, maxX); >+ bounds.height, maxX, >+ FacetTooltip.fApearanceConfiguration.getCustomizationEngine(), >+ FacetTooltip.fApearanceConfiguration.getFacetContext()); > Facet facet = findFacetAt(event.x, event.y, facetsToPaint); > > if (facet != null) { >#P org.eclipse.emf.facet.widgets.nattable >Index: src/org/eclipse/emf/facet/widgets/nattable/painter/CustomizedCellPainter.java >=================================================================== >--- src/org/eclipse/emf/facet/widgets/nattable/painter/CustomizedCellPainter.java (revision 9425) >+++ src/org/eclipse/emf/facet/widgets/nattable/painter/CustomizedCellPainter.java (working copy) >@@ -29,8 +29,11 @@ > import org.eclipse.emf.ecore.EClass; > import org.eclipse.emf.ecore.EObject; > import org.eclipse.emf.ecore.EReference; >+import org.eclipse.emf.facet.infra.browser.uicore.internal.CustomTreePainter; >+import org.eclipse.emf.facet.infra.browser.uicore.internal.FacetToPaint; > import org.eclipse.emf.facet.infra.browser.uicore.internal.customization.CustomizationEngine; > import org.eclipse.emf.facet.infra.common.core.logging.Logger; >+import org.eclipse.emf.facet.infra.facet.Facet; > import org.eclipse.emf.facet.widgets.nattable.Activator; > import org.eclipse.emf.facet.widgets.nattable.ColumnDescription; > import org.eclipse.emf.facet.widgets.nattable.ColumnDescription.Type; >@@ -87,6 +90,10 @@ > ColumnDescription columnDescription = this.natTableWidget.getColumnDescriptions().get( > convertedColumn); > >+ // leave a 2 pixel wide margin >+ Rectangle rectangleWithMargin = new Rectangle(rectangle.x + 2, rectangle.y + 2, >+ rectangle.width - 2 * 2, rectangle.height - 2 * 2); >+ > Color backgroundColor = CellStyleUtil.getCellStyle(cell, configRegistry).getAttributeValue( > CellStyleAttributes.BACKGROUND_COLOR); > Customization customization = null; >@@ -97,7 +104,7 @@ > Object element = gridElement.getElement(); > if (element instanceof EObject) { > EObject eObject = (EObject) element; >- customization = getCustomization(eObject, columnDescription); >+ customization = getCustomization(eObject, columnDescription, rectangleWithMargin); > } > } > // } >@@ -119,12 +126,7 @@ > gc.setBackground(originalBackground); > > Rectangle originalClipping = gc.getClipping(); >- // leave a margin >- rectangle.x += 2; >- rectangle.y += 2; >- rectangle.width -= 2 * 2; >- rectangle.height -= 2 * 2; >- gc.setClipping(rectangle.intersection(originalClipping)); >+ gc.setClipping(rectangleWithMargin); > > IStyle cellStyle = CellStyleUtil.getCellStyle(cell, configRegistry); > setupGCFromConfig(gc, cellStyle); >@@ -142,40 +144,92 @@ > } > } > >+ gc.setClipping(rectangle); >+ > boolean hasIcon = false; > if (customization != null && customization.getInstanceIcon() != null) { >- gc.drawImage(customization.getInstanceIcon(), rectangle.x, rectangle.y); >+ gc.drawImage(customization.getInstanceIcon(), rectangleWithMargin.x, >+ rectangleWithMargin.y); > hasIcon = true; > } else { > Image columnImage = this.tableLabelProvider.getColumnImage(cell.getDataValue(), > convertedColumn); > if (columnImage != null) { >- gc.drawImage(columnImage, rectangle.x, rectangle.y); >+ gc.drawImage(columnImage, rectangleWithMargin.x, rectangleWithMargin.y); > hasIcon = true; > } > } > >+ boolean hasOverlay = false; >+ if (customization != null) { >+ int facetMinX = rectangle.width; >+ List<FacetToPaint> facetsToMeasure = customization.getFacetsToPaint(); >+ for (FacetToPaint facetToPaint : facetsToMeasure) { >+ if (!facetToPaint.isOverlay()) { >+ facetMinX = Math.min(facetMinX, facetToPaint.getBounds().x); >+ } else { >+ hasOverlay = true; >+ } >+ } >+ // reduce the clipping, so as to not draw again over stickers >+ Rectangle textClipping = new Rectangle(rectangleWithMargin.x, rectangleWithMargin.y, >+ facetMinX - 2, rectangleWithMargin.height); >+ gc.setClipping(textClipping); >+ } >+ > if (hasIcon) { >+ final int totalOffsetAfterIcon; > final int offsetAfterIcon = 18; >- gc.drawText(text, rectangle.x + offsetAfterIcon, rectangle.y, true); >+ final int overlaySize = 8; >+ if (hasOverlay) { >+ totalOffsetAfterIcon = offsetAfterIcon + overlaySize; >+ } else { >+ totalOffsetAfterIcon = offsetAfterIcon; >+ } >+ >+ gc.drawText(text, rectangleWithMargin.x + totalOffsetAfterIcon, rectangleWithMargin.y, true); > } else { >- gc.drawText(text, rectangle.x, rectangle.y, true); >+ gc.drawText(text, rectangleWithMargin.x, rectangleWithMargin.y, true); > } > >+ gc.setClipping(rectangle); >+ > if (customization != null) { > final int leftMargin = 0; > final int rightMargin = 0; > > if (customization.isUnderlined()) { >- final int y = rectangle.y + rectangle.height - 1; >- gc.drawLine(rectangle.x + leftMargin, y, rectangle.x + rectangle.width >- - rightMargin, y); >+ final int y = rectangleWithMargin.y + rectangleWithMargin.height - 1; >+ gc.drawLine(rectangleWithMargin.x + leftMargin, y, rectangleWithMargin.x >+ + rectangleWithMargin.width - rightMargin, y); > } > > if (customization.isStruckthrough()) { >- final int y = rectangle.y + rectangle.height / 2 + 1; >- gc.drawLine(rectangle.x + leftMargin, y, rectangle.x + rectangle.width >- - rightMargin, y); >+ final int y = rectangleWithMargin.y + rectangleWithMargin.height / 2 + 1; >+ gc.drawLine(rectangleWithMargin.x + leftMargin, y, rectangleWithMargin.x >+ + rectangleWithMargin.width - rightMargin, y); >+ } >+ } >+ >+ if (customization != null) { >+ List<FacetToPaint> facetsToPaint = customization.getFacetsToPaint(); >+ final int facetStickerBackgroundOpacity = 192; >+ for (FacetToPaint facetToPaint : facetsToPaint) { >+ Image customizedIcon = facetToPaint.getImage(); >+ if (customizedIcon != null) { >+ Rectangle bounds = customizedIcon.getBounds(); >+ Rectangle target = facetToPaint.getBounds(); >+ Rectangle stickerRectangle = new Rectangle(rectangle.x + target.x + 1, >+ rectangle.y + target.y + 1, target.width, target.height); >+ // int oldAlpha = gc.getAlpha(); >+ // gc.setAlpha(facetStickerBackgroundOpacity); >+ // gc.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE)); >+ // gc.fillRectangle(stickerRectangle); >+ // gc.setAlpha(oldAlpha); >+ gc.drawImage(customizedIcon, 0, 0, bounds.width, bounds.height, >+ stickerRectangle.x, stickerRectangle.y, stickerRectangle.width, >+ stickerRectangle.height); >+ } > } > } > >@@ -196,10 +250,11 @@ > } > > private Customization getCustomization(final EObject eObject, >- final ColumnDescription columnDescription) { >+ final ColumnDescription columnDescription, final Rectangle rectangle) { > // label column : customization on the EObject, defined on the EClass > // unary reference : customization on the EObject, defined on the EClass >- // n-ary reference with a single element: customization on the EObject, defined on the EClass >+ // n-ary reference with a single element: customization on the EObject, >+ // defined on the EClass > // n-ary reference (!= 1): no customization > // attribute : customization on the EObject, defined on the EAttribute > >@@ -278,8 +333,23 @@ > (EClass) attribute.eContainer(), attribute.getName(), customizedEObject)); > } else { > customization.setLabel(this.customizationEngine.getTypeLabel(customizedEObject)); >- customization.setInstanceIcon(this.customizationEngine.getTypeIcon(customizedEObject, >- customizedEObject.eClass())); >+ >+ // Facet icon customization >+ Image facetIcon = null; >+ for (final Facet facet : this.natTableWidget.getFacetContext().getFacets( >+ customizedEObject)) { >+ facetIcon = this.customizationEngine.getFacetMainIcon(customizedEObject, facet); >+ if (facetIcon != null) { >+ // first one wins >+ break; >+ } >+ } >+ if (facetIcon != null) { >+ customization.setInstanceIcon(facetIcon); >+ } else { >+ customization.setInstanceIcon(this.customizationEngine.getTypeIcon( >+ customizedEObject, customizedEObject.eClass())); >+ } > customization.setBackground(this.customizationEngine > .getTypeBackgroundColor(customizedEObject)); > customization.setForeground(this.customizationEngine.getTypeColor(customizedEObject)); >@@ -289,6 +359,12 @@ > customizedEObject.eClass(), customizedEObject)); > customization.setStruckthrough(this.customizationEngine.isTypeStruckthrough( > customizedEObject.eClass(), customizedEObject)); >+ >+ List<FacetToPaint> facetsToPaint = CustomTreePainter.getFacetsToPaintFor( >+ customizedEObject, 0, rectangle.width, 0, rectangle.height, rectangle.width, >+ this.customizationEngine, this.natTableWidget.getFacetContext()); >+ customization.setFacetsToPaint(facetsToPaint); >+ > } > return customization; > } >Index: src/org/eclipse/emf/facet/widgets/nattable/painter/Customization.java >=================================================================== >--- src/org/eclipse/emf/facet/widgets/nattable/painter/Customization.java (revision 9425) >+++ src/org/eclipse/emf/facet/widgets/nattable/painter/Customization.java (working copy) >@@ -11,6 +11,10 @@ > *******************************************************************************/ > package org.eclipse.emf.facet.widgets.nattable.painter; > >+import java.util.Collections; >+import java.util.List; >+ >+import org.eclipse.emf.facet.infra.browser.uicore.internal.FacetToPaint; > import org.eclipse.swt.graphics.Color; > import org.eclipse.swt.graphics.Font; > import org.eclipse.swt.graphics.Image; >@@ -23,6 +27,7 @@ > private Font font; > private boolean underlined; > private boolean struckthrough; >+ private List<FacetToPaint> facetsToPaint; > > public Customization() { > } >@@ -82,4 +87,15 @@ > public void setLabel(final String label) { > this.label = label; > } >+ >+ public List<FacetToPaint> getFacetsToPaint() { >+ if (this.facetsToPaint == null) { >+ return Collections.emptyList(); >+ } >+ return this.facetsToPaint; >+ } >+ >+ public void setFacetsToPaint(final List<FacetToPaint> facetsToPaint) { >+ this.facetsToPaint = facetsToPaint; >+ } > } >\ No newline at end of file >#P org.eclipse.emf.facet.infra.browser.uicore >Index: src/org/eclipse/emf/facet/infra/browser/uicore/internal/CustomTreePainter.java >=================================================================== >--- src/org/eclipse/emf/facet/infra/browser/uicore/internal/CustomTreePainter.java (revision 125) >+++ src/org/eclipse/emf/facet/infra/browser/uicore/internal/CustomTreePainter.java (working copy) >@@ -26,6 +26,7 @@ > import org.eclipse.emf.facet.infra.browser.uicore.internal.util.ImageProvider; > import org.eclipse.emf.facet.infra.common.core.logging.Logger; > import org.eclipse.emf.facet.infra.facet.Facet; >+import org.eclipse.emf.facet.infra.facet.core.FacetContext; > import org.eclipse.swt.SWT; > import org.eclipse.swt.events.MouseEvent; > import org.eclipse.swt.events.MouseMoveListener; >@@ -140,7 +141,9 @@ > int maxX = this.fTree.getClientArea().width > + this.fTree.getHorizontalBar().getSelection(); > List<FacetToPaint> facetsToPaint = getFacetsToPaintFor(eObject, event.x, event.width, >- event.y, event.height, maxX); >+ event.y, event.height, maxX, >+ this.appearanceConfiguration.getCustomizationEngine(), >+ this.appearanceConfiguration.getFacetContext()); > if (!facetsToPaint.isEmpty()) { > Rectangle lastFacetBounds = facetsToPaint.get(facetsToPaint.size() - 1).getBounds(); > event.width = lastFacetBounds.x + lastFacetBounds.width; >@@ -199,53 +202,6 @@ > - shortcutIcon.getBounds().height - 1); > } > >- public class FacetToPaint { >- private static final int INITIAL_ALPHA = 255; >- private final Rectangle bounds; >- private final Facet facet; >- private int alpha = CustomTreePainter.FacetToPaint.INITIAL_ALPHA; >- private final Rectangle itemBounds; >- private final Image image; >- private final boolean overlay; >- >- public FacetToPaint(final Rectangle bounds, final Rectangle itemBounds, final Facet facet, >- final Image image, final boolean overlay) { >- this.bounds = bounds; >- this.itemBounds = itemBounds; >- this.facet = facet; >- this.image = image; >- this.overlay = overlay; >- } >- >- public Rectangle getBounds() { >- return this.bounds; >- } >- >- public Rectangle getItemBounds() { >- return this.itemBounds; >- } >- >- public Facet getFacet() { >- return this.facet; >- } >- >- public Image getImage() { >- return this.image; >- } >- >- public boolean isOverlay() { >- return this.overlay; >- } >- >- public void setAlpha(final int alpha) { >- this.alpha = alpha; >- } >- >- public int getAlpha() { >- return this.alpha; >- } >- } >- > /** > * @param eObject > * the model element for which facets are to be painted >@@ -261,8 +217,9 @@ > * the maximum visible offset in the tree > * @return a list of facets to paint > */ >- public List<CustomTreePainter.FacetToPaint> getFacetsToPaintFor(final EObject eObject, >- final int posX, final int width, final int posY, final int height, final int maxX) { >+ public static List<FacetToPaint> getFacetsToPaintFor(final EObject eObject, final int posX, >+ final int width, final int posY, final int height, final int maxX, >+ final CustomizationEngine customizationEngine, final FacetContext facetContext) { > final int rightX = posX + width; > final int margin = 8; > int offset = margin; >@@ -272,14 +229,12 @@ > final int overlayIconWidth = 8; > final int overlayIconHeight = 8; > >- List<CustomTreePainter.FacetToPaint> facetsToPaint = new ArrayList<CustomTreePainter.FacetToPaint>(); >+ List<FacetToPaint> facetsToPaint = new ArrayList<FacetToPaint>(); > > int lastX = 0; > >- final CustomizationEngine customizationEngine = this.appearanceConfiguration >- .getCustomizationEngine(); > Rectangle itemBounds = new Rectangle(posX, posY, width, height); >- for (final Facet facet : this.appearanceConfiguration.getFacetContext().getFacets(eObject)) { >+ for (final Facet facet : facetContext.getFacets(eObject)) { > OverlayIconImageInfo facetOverlayIcon = customizationEngine.getFacetOverlayIcon( > eObject, facet); > if (facetOverlayIcon != null) { >@@ -311,10 +266,9 @@ > > if (lastX > maxX) { > int shift = lastX - maxX; >- ListIterator<CustomTreePainter.FacetToPaint> facetsToPaintIterator = facetsToPaint >- .listIterator(); >+ ListIterator<FacetToPaint> facetsToPaintIterator = facetsToPaint.listIterator(); > while (facetsToPaintIterator.hasNext()) { >- CustomTreePainter.FacetToPaint facetToPaint = facetsToPaintIterator.next(); >+ FacetToPaint facetToPaint = facetsToPaintIterator.next(); > if (!facetToPaint.isOverlay()) { > facetToPaint.getBounds().x -= shift; > final int minVisibleText = 50; >@@ -339,8 +293,9 @@ > return facetsToPaint; > } > >- private Point getOverlayIconOffset(final OverlayIconImageInfo facetOverlayIcon) { >+ public static Point getOverlayIconOffset(final OverlayIconImageInfo facetOverlayIcon) { > final int step = 8; >+ // with a (step×3)×(step×3) grid > switch (facetOverlayIcon.getIconPosition()) { > case TopLeft: > return new Point(0, 0); >@@ -366,8 +321,10 @@ > final EObject eObject = modelElementItem.getEObject(); > int maxX = this.fTree.getClientArea().width > + this.fTree.getHorizontalBar().getSelection(); >- List<CustomTreePainter.FacetToPaint> facetsToPaint = getFacetsToPaintFor(eObject, >- event.x, event.width, event.y, event.height, maxX); >+ List<FacetToPaint> facetsToPaint = getFacetsToPaintFor(eObject, event.x, event.width, >+ event.y, event.height, maxX, >+ this.appearanceConfiguration.getCustomizationEngine(), >+ this.appearanceConfiguration.getFacetContext()); > > if (facetsToPaint.isEmpty()) { > // enable default tooltip >@@ -407,8 +364,7 @@ > } > } > >- private boolean hoveringOnTextLeftOfFacets( >- final List<CustomTreePainter.FacetToPaint> facetsToPaint) { >+ private boolean hoveringOnTextLeftOfFacets(final List<FacetToPaint> facetsToPaint) { > if (facetsToPaint.size() == 0) { > return false; > } >Index: src/org/eclipse/emf/facet/infra/browser/uicore/internal/FacetToPaint.java >=================================================================== >--- src/org/eclipse/emf/facet/infra/browser/uicore/internal/FacetToPaint.java (revision 0) >+++ src/org/eclipse/emf/facet/infra/browser/uicore/internal/FacetToPaint.java (revision 0) >@@ -0,0 +1,62 @@ >+/******************************************************************************* >+ * Copyright (c) 2009, 2010 Mia-Software. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Nicolas Bros (Mia-Software) - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.emf.facet.infra.browser.uicore.internal; >+ >+import org.eclipse.emf.facet.infra.facet.Facet; >+import org.eclipse.swt.graphics.Image; >+import org.eclipse.swt.graphics.Rectangle; >+ >+public class FacetToPaint { >+ private static final int INITIAL_ALPHA = 255; >+ private final Rectangle bounds; >+ private final Facet facet; >+ private int alpha = FacetToPaint.INITIAL_ALPHA; >+ private final Rectangle itemBounds; >+ private final Image image; >+ private final boolean overlay; >+ >+ public FacetToPaint(final Rectangle bounds, final Rectangle itemBounds, final Facet facet, >+ final Image image, final boolean overlay) { >+ this.bounds = bounds; >+ this.itemBounds = itemBounds; >+ this.facet = facet; >+ this.image = image; >+ this.overlay = overlay; >+ } >+ >+ public Rectangle getBounds() { >+ return this.bounds; >+ } >+ >+ public Rectangle getItemBounds() { >+ return this.itemBounds; >+ } >+ >+ public Facet getFacet() { >+ return this.facet; >+ } >+ >+ public Image getImage() { >+ return this.image; >+ } >+ >+ public boolean isOverlay() { >+ return this.overlay; >+ } >+ >+ public void setAlpha(final int alpha) { >+ this.alpha = alpha; >+ } >+ >+ public int getAlpha() { >+ return this.alpha; >+ } >+} >\ No newline at end of file
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 332010
:
184725
|
184726
|
185066