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 55793 Details for
Bug 162932
[NoteTextLabel] WrapLabel should use Gef's text layout
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch for GMF
WrapLabelPatch061215_GEF.txt (text/plain), 6.90 KB, created by
Syed Atif
on 2006-12-15 17:00:24 EST
(
hide
)
Description:
Patch for GMF
Filename:
MIME Type:
Creator:
Syed Atif
Created:
2006-12-15 17:00:24 EST
Size:
6.90 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.draw2d >Index: src/org/eclipse/draw2d/text/FlowUtilities.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.draw2d/src/org/eclipse/draw2d/text/FlowUtilities.java,v >retrieving revision 1.56 >diff -u -r1.56 FlowUtilities.java >--- src/org/eclipse/draw2d/text/FlowUtilities.java 4 Apr 2006 12:43:12 -0000 1.56 >+++ src/org/eclipse/draw2d/text/FlowUtilities.java 15 Dec 2006 21:35:02 -0000 >@@ -25,20 +25,20 @@ > * @author hudsonr > * @since 2.1 > */ >-class FlowUtilities >+public class FlowUtilities > extends FigureUtilities > { > >-interface LookAhead { >+public interface LookAhead { > int getWidth(); > } > private static int ELLIPSIS_SIZE; > private static final BreakIterator INTERNAL_LINE_BREAK = BreakIterator.getLineInstance(); > private static TextLayout layout; > >-static final BreakIterator LINE_BREAK = BreakIterator.getLineInstance(); >+public static final BreakIterator LINE_BREAK = BreakIterator.getLineInstance(); > >-static boolean canBreakAfter(char c) { >+public static boolean canBreakAfter(char c) { > boolean result = Character.isWhitespace(c) || c == '-'; > if (!result && (c < 'a' || c > 'z')) { > // chinese characters and such would be caught in here >@@ -49,7 +49,7 @@ > return result; > } > >-private static int findFirstDelimeter(String string) { >+protected static int findFirstDelimeter(String string) { > int macNL = string.indexOf('\r'); > int unixNL = string.indexOf('\n'); > >@@ -107,7 +107,7 @@ > * @return an SWT TextLayout that can be used for Bidi > * @since 3.1 > */ >-static TextLayout getTextLayout() { >+public static TextLayout getTextLayout() { > if (layout == null) > layout = new TextLayout(Display.getDefault()); > layout.setOrientation(SWT.LEFT_TO_RIGHT); >@@ -120,7 +120,7 @@ > * @param font > * @since 3.1 > */ >-private static void initBidi(TextFragmentBox frag, String string, Font font) { >+protected static void initBidi(TextFragmentBox frag, String string, Font font) { > if (frag.requiresBidi()) { > TextLayout textLayout = getTextLayout(); > textLayout.setFont(font); >Index: src/org/eclipse/draw2d/text/LineRoot.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.draw2d/src/org/eclipse/draw2d/text/LineRoot.java,v >retrieving revision 1.6 >diff -u -r1.6 LineRoot.java >--- src/org/eclipse/draw2d/text/LineRoot.java 24 Jun 2005 20:01:42 -0000 1.6 >+++ src/org/eclipse/draw2d/text/LineRoot.java 15 Dec 2006 21:35:02 -0000 >@@ -145,11 +145,11 @@ > return this; > } > >-int getVisibleBottom() { >+public int getVisibleBottom() { > return baseline + contentDescent; > } > >-int getVisibleTop() { >+public int getVisibleTop() { > return baseline - contentAscent; > } > >Index: src/org/eclipse/draw2d/text/TextFlow.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.draw2d/src/org/eclipse/draw2d/text/TextFlow.java,v >retrieving revision 1.55 >diff -u -r1.55 TextFlow.java >--- src/org/eclipse/draw2d/text/TextFlow.java 14 Feb 2006 20:13:32 -0000 1.55 >+++ src/org/eclipse/draw2d/text/TextFlow.java 15 Dec 2006 21:35:02 -0000 >@@ -74,7 +74,7 @@ > * @return <code>true</code> if a line-break was found > * @since 3.1 > */ >-boolean addLeadingWordWidth(String text, int[] width) { >+public boolean addLeadingWordWidth(String text, int[] width) { > if (text.length() == 0) > return false; > if (Character.isWhitespace(text.charAt(0))) >@@ -174,7 +174,7 @@ > return findOffset(p, trailing, closestBox, index); > } > >-int getAscent() { >+public int getAscent() { > FontMetrics fm = FigureUtilities.getFontMetrics(getFont()); > return fm.getHeight() - fm.getDescent(); > } >@@ -259,7 +259,7 @@ > return info; > } > >-Point getPointInBox(TextFragmentBox box, int offset, int index, boolean trailing) { >+protected Point getPointInBox(TextFragmentBox box, int offset, int index, boolean trailing) { > offset -= box.offset; > offset = Math.min(box.length, offset); > Point result = new Point(0, box.getTextTop()); >@@ -282,7 +282,7 @@ > return result; > } > >-int getDescent() { >+public int getDescent() { > return FigureUtilities.getFontMetrics(getFont()).getDescent(); > } > >Index: src/org/eclipse/draw2d/text/ContentBox.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.draw2d/src/org/eclipse/draw2d/text/ContentBox.java,v >retrieving revision 1.5 >diff -u -r1.5 ContentBox.java >--- src/org/eclipse/draw2d/text/ContentBox.java 29 Mar 2005 23:58:02 -0000 1.5 >+++ src/org/eclipse/draw2d/text/ContentBox.java 15 Dec 2006 21:35:02 -0000 >@@ -39,7 +39,7 @@ > /** > * @see org.eclipse.draw2d.text.FlowBox#getLineRoot() > */ >-LineRoot getLineRoot() { >+public LineRoot getLineRoot() { > return lineRoot; > } > >Index: src/org/eclipse/draw2d/text/ParagraphTextLayout.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.draw2d/src/org/eclipse/draw2d/text/ParagraphTextLayout.java,v >retrieving revision 1.31 >diff -u -r1.31 ParagraphTextLayout.java >--- src/org/eclipse/draw2d/text/ParagraphTextLayout.java 1 Jun 2005 19:56:30 -0000 1.31 >+++ src/org/eclipse/draw2d/text/ParagraphTextLayout.java 15 Dec 2006 21:35:02 -0000 >@@ -204,4 +204,28 @@ > fragments.remove(fragments.size() - 1); > } > >+ >+/** >+ * @return the wrapping style being used. >+ * @since 3.2 >+ */ >+public int getWrappingStyle() { >+ return wrappingStyle; >+} >+ >+ >+/** >+ * Sets the wrapping style. Default is WORD_WRAP_HARD. <p> >+ * Can be the following values:<br> >+ * 1. WORD_WRAP_HARD <br> >+ * 2. WORD_WRAP_SOFT <br> >+ * 3. WORD_WRAP_TRUNCATE <p> >+ * >+ * @param wrappingStyle >+ * @since 3.2 >+ */ >+public void setWrappingStyle(int wrappingStyle) { >+ this.wrappingStyle = wrappingStyle; >+} >+ > } >Index: src/org/eclipse/draw2d/text/BidiChars.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.draw2d/src/org/eclipse/draw2d/text/BidiChars.java,v >retrieving revision 1.4 >diff -u -r1.4 BidiChars.java >--- src/org/eclipse/draw2d/text/BidiChars.java 16 May 2005 23:13:44 -0000 1.4 >+++ src/org/eclipse/draw2d/text/BidiChars.java 15 Dec 2006 21:35:02 -0000 >@@ -14,14 +14,14 @@ > /** > * @since 3.1 > */ >-class BidiChars { >+public class BidiChars { > >-static final char P_SEP = '\u2029'; >-static final char ZWJ = '\u200d'; >-static final char LRO = '\u202d'; >-static final char RLO = '\u202e'; >-static final char OBJ = '\ufffc'; >-static final char LRE = '\u202a'; >-static final char RLE = '\u202b'; >+public static final char P_SEP = '\u2029'; >+public static final char ZWJ = '\u200d'; >+public static final char LRO = '\u202d'; >+public static final char RLO = '\u202e'; >+public static final char OBJ = '\ufffc'; >+public static final char LRE = '\u202a'; >+public static final char RLE = '\u202b'; > > } >\ 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 162932
: 55793 |
55794
|
80456