Available Methods
- NONE
- BORDER
- V_SCROLL
- PUSH
- CHECK
- LEFT
- MULTI
- SINGLE
- READ_ONLY
- OK
- H_SCROLL
- FILL
- CENTER
- WRAP
- error ( )
- ICON_ERROR
- RIGHT
- NULL
- HORIZONTAL
- FULL_SELECTION
- BOLD
- SEPARATOR
- DEFAULT
- RADIO
- RESIZE
- FLAT
- VERTICAL
- TOP
- DROP_DOWN
- ITALIC
- NORMAL
- SAVE
- ICON_INFORMATION
- CTRL
- SHIFT
- NO_FOCUS
- APPLICATION_MODAL
- DIALOG_TRIM
- DOUBLE_BUFFERED
- OPEN
- CR
- ARROW_DOWN
- Selection ( )
- YES
- CANCEL
- BOTTOM
- NO_BACKGROUND
- NO
- CLOSE
- ICON_WARNING
- RIGHT_TO_LEFT
- LEFT_TO_RIGHT
- TOGGLE
- SHEET
- DOWN
- BEGINNING
- MAX
- ARROW_LEFT
- ARROW_RIGHT
- NO_TRIM
- END
- ON_TOP
- MIN
- ARROW_UP
- KeyDown ( )
- KeyUp ( )
- ICON_QUESTION
- Dispose ( )
- ALT
- CASCADE
- VIRTUAL
- SHADOW_ETCHED_IN
- PAGE_UP
- DEL
- FocusOut ( )
- Traverse ( )
- PASSWORD
- SHELL_TRIM
- ARROW
- Deactivate ( )
- BS
- FocusIn ( )
- ESC
- LEAD
- MouseUp ( )
- SMOOTH
- MouseDoubleClick ( )
- TRAVERSE_TAB_NEXT
- UP
- MouseDown ( )
- TITLE
- Paint ( )
- PAGE_DOWN
- Move ( )
- HOME
- SHADOW_IN
- TRAVERSE_TAB_PREVIOUS
- F2 ( )
- LINE_SOLID
- HIDE_SELECTION
- JOIN_BEVEL
- SHADOW_NONE
- Modify ( )
- BAR
- SEARCH
- COMMAND
- LINE_DASHDOT
- ICON_SEARCH
- TAB
- SHADOW_OUT
- LINE_DASH
- KEYPAD_CR
- LINE_DOT
- JOIN_ROUND
- MOD1 ( )
- TOOL
- MODIFIER_MASK
- CURSOR_ARROW
- IMAGE_GIF
- LF
- MouseEnter ( )
- MouseMove ( )
- TRAVERSE_ARROW_PREVIOUS
- UNDERLINE_LINK
- MODELESS
- CURSOR_HAND
- IMAGE_JPEG
- MouseHover ( )
- CURSOR_WAIT
- getPlatform ( )
- IMAGE_BMP
- PRIMARY_MODAL
- CAP_FLAT
- UNDERLINE_ERROR
- POP_UP
- CAP_ROUND
- SIMPLE
- DATE
- EraseItem ( )
- TRANSPARENT
- TIME
- CAP_SQUARE
- COLOR_DARK_GREEN
- FOREGROUND
- INHERIT_DEFAULT
- KEYPAD_SUBTRACT
- TRAVERSE_ARROW_NEXT
- Help ( )
- LINE_DASHDOTDOT
- TRAVERSE_ESCAPE
- MouseExit ( )
- JOIN_MITER
- NO_SCROLL
- Collapse ( )
- F9 ( )
- FILL_WINDING
- HIGH
- ERROR_NULL_ARGUMENT
- BORDER_DOT
- CAPS_LOCK
- ICON_CANCEL
- KEYPAD_4 ( )
- PATH_MOVE_TO
- MOD2 ( )
- INDETERMINATE
- NO_REDRAW_RESIZE
- INSERT
- DefaultSelection ( )
- SYSTEM_MODAL
- IMAGE_COPY
- CALENDAR
- BACKGROUND
- MOD4 ( )
Related Classes
- java.io.File
- org.eclipse.swt.widgets.Composite
- org.eclipse.swt.widgets.Display
- org.eclipse.swt.widgets.Button
- org.eclipse.swt.widgets.Label
- org.eclipse.swt.widgets.Shell
- org.eclipse.swt.layout.GridData
- org.eclipse.swt.widgets.Text
- org.eclipse.swt.layout.GridLayout
- org.eclipse.swt.events.SelectionEvent
- org.eclipse.swt.events.SelectionAdapter
- org.eclipse.swt.widgets.Control
- org.eclipse.swt.graphics.Image
- org.eclipse.swt.widgets.Group
- org.eclipse.swt.widgets.Event
- org.eclipse.swt.graphics.Point
- org.eclipse.swt.graphics.Color
- org.eclipse.ui.PlatformUI
- org.eclipse.swt.widgets.Listener
- org.eclipse.swt.events.SelectionListener
- org.eclipse.swt.events.ModifyListener
- org.eclipse.swt.widgets.Combo
- org.eclipse.swt.widgets.FileDialog
- org.eclipse.swt.events.ModifyEvent
- org.eclipse.jface.viewers.IStructuredSelection
Java Code Examples for org.eclipse.swt.SWT#FILL_WINDING
The following examples show how to use
org.eclipse.swt.SWT#FILL_WINDING .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SvgLoader.java From nebula with Eclipse Public License 2.0 | 5 votes |
private static Integer parseRule(String s) { if(s != null) { if("evenodd".equals(s)) { //$NON-NLS-1$ return SWT.FILL_EVEN_ODD; } else if("winding".equals(s)) { //$NON-NLS-1$ return SWT.FILL_WINDING; } } return null; }
Example 2
Source File: SWT2AWT.java From gef with Eclipse Public License 2.0 | 4 votes |
/** * Converts an SWT {@link PathData} into an equivalent AWT * {@link PathIterator}. * * @param pathData * the {@link PathData} to convert. * @param windingRule * the winding rule to use when constructing the * {@link PathIterator}, i.e. one of {@link SWT#FILL_WINDING} or * {@link SWT#FILL_EVEN_ODD}. * @return a new {@link PathIterator} representing the same path */ public static PathIterator toAWTPathIterator(PathData pathData, int windingRule) { if (windingRule != SWT.FILL_WINDING && windingRule != SWT.FILL_EVEN_ODD) { throw new IllegalArgumentException( "Unsupported winding rule. Must be one of SWT.FILL_WINDING or SWT.FILL_EVEN_ODD"); } Path2D.Double path = new Path2D.Double( windingRule == SWT.FILL_EVEN_ODD ? Path2D.WIND_EVEN_ODD : Path2D.WIND_NON_ZERO); int j = 0; byte[] types = pathData.types; float[] points = pathData.points; double x, y, x2, y2, x3, y3; for (int i = 0; i < types.length; i++) { switch (types[i]) { case SWT.PATH_MOVE_TO: x = points[j++]; y = points[j++]; path.moveTo(x, y); break; case SWT.PATH_LINE_TO: x = points[j++]; y = points[j++]; path.lineTo(x, y); break; case SWT.PATH_QUAD_TO: x = points[j++]; y = points[j++]; x2 = points[j++]; y2 = points[j++]; path.quadTo(x, y, x2, y2); break; case SWT.PATH_CUBIC_TO: x = points[j++]; y = points[j++]; x2 = points[j++]; y2 = points[j++]; x3 = points[j++]; y3 = points[j++]; path.curveTo(x, y, x2, y2, x3, y3); break; case SWT.PATH_CLOSE: path.closePath(); break; default: break; } } return path.getPathIterator(null); }
Example 3
Source File: SWTConversionTests.java From gef with Eclipse Public License 2.0 | 4 votes |
@Test public void test_AWT_Path() { PathIterator pathIteratorBefore = new java.awt.geom.Path2D.Double( new java.awt.geom.RoundRectangle2D.Double(0, 0, 100, 80, 10, 10)).getPathIterator(null); PathData swtPathData = AWT2SWT.toSWTPathData(pathIteratorBefore); int windingRuleSWT = pathIteratorBefore.getWindingRule() == java.awt.geom.Path2D.WIND_EVEN_ODD ? SWT.FILL_EVEN_ODD : SWT.FILL_WINDING; PathIterator pathIteratorAfter = SWT2AWT.toAWTPathIterator(swtPathData, windingRuleSWT); while (!pathIteratorBefore.isDone()) { assertFalse(pathIteratorAfter.isDone()); float[] coordsBefore = new float[6]; float[] coordsAfter = new float[6]; int typeBefore = pathIteratorBefore.currentSegment(coordsBefore); int typeAfter = pathIteratorAfter.currentSegment(coordsAfter); assertEquals(typeBefore, typeAfter); int numCoords = 0; switch (typeBefore) { case java.awt.geom.PathIterator.SEG_MOVETO: case java.awt.geom.PathIterator.SEG_LINETO: numCoords = 2; break; case java.awt.geom.PathIterator.SEG_QUADTO: numCoords = 4; break; case java.awt.geom.PathIterator.SEG_CUBICTO: numCoords = 6; break; } for (int i = 0; i < numCoords; i++) { assertTrue(PrecisionUtils.equal(coordsBefore[i], coordsAfter[i])); } pathIteratorBefore.next(); pathIteratorAfter.next(); } }