Java Code Examples for sun.font.BidiUtils#reorderVisually()
The following examples show how to use
sun.font.BidiUtils#reorderVisually() .
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: TextLayoutStrategy.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Creates a row of views that will fit within the * layout span of the row. This is implemented to execute the * superclass functionality (which fills the row with child * views or view fragments) and follow that with bidi reordering * of the unidirectional view fragments. * * @param rowIndex the row to fill in with views. This is assumed * to be empty on entry. * @param p0 The current position in the children of * this views element from which to start. * @return the position to start the next row */ protected int layoutRow(FlowView fv, int rowIndex, int p0) { int p1 = super.layoutRow(fv, rowIndex, p0); View row = fv.getView(rowIndex); Document doc = fv.getDocument(); Object i18nFlag = doc.getProperty(AbstractDocument.I18NProperty); if ((i18nFlag != null) && i18nFlag.equals(Boolean.TRUE)) { int n = row.getViewCount(); if (n > 1) { AbstractDocument d = (AbstractDocument)fv.getDocument(); Element bidiRoot = d.getBidiRootElement(); byte[] levels = new byte[n]; View[] reorder = new View[n]; for( int i=0; i<n; i++ ) { View v = row.getView(i); int bidiIndex =bidiRoot.getElementIndex(v.getStartOffset()); Element bidiElem = bidiRoot.getElement( bidiIndex ); levels[i] = (byte)StyleConstants.getBidiLevel(bidiElem.getAttributes()); reorder[i] = v; } BidiUtils.reorderVisually( levels, reorder ); row.replace(0, n, reorder); } } return p1; }
Example 2
Source File: TextLayoutStrategy.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
/** * Creates a row of views that will fit within the * layout span of the row. This is implemented to execute the * superclass functionality (which fills the row with child * views or view fragments) and follow that with bidi reordering * of the unidirectional view fragments. * * @param row the row to fill in with views. This is assumed * to be empty on entry. * @param pos The current position in the children of * this views element from which to start. * @return the position to start the next row */ protected int layoutRow(FlowView fv, int rowIndex, int p0) { int p1 = super.layoutRow(fv, rowIndex, p0); View row = fv.getView(rowIndex); Document doc = fv.getDocument(); Object i18nFlag = doc.getProperty(AbstractDocument.I18NProperty); if ((i18nFlag != null) && i18nFlag.equals(Boolean.TRUE)) { int n = row.getViewCount(); if (n > 1) { AbstractDocument d = (AbstractDocument)fv.getDocument(); Element bidiRoot = d.getBidiRootElement(); byte[] levels = new byte[n]; View[] reorder = new View[n]; for( int i=0; i<n; i++ ) { View v = row.getView(i); int bidiIndex =bidiRoot.getElementIndex(v.getStartOffset()); Element bidiElem = bidiRoot.getElement( bidiIndex ); levels[i] = (byte)StyleConstants.getBidiLevel(bidiElem.getAttributes()); reorder[i] = v; } BidiUtils.reorderVisually( levels, reorder ); row.replace(0, n, reorder); } } return p1; }
Example 3
Source File: TextLayoutStrategy.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Creates a row of views that will fit within the * layout span of the row. This is implemented to execute the * superclass functionality (which fills the row with child * views or view fragments) and follow that with bidi reordering * of the unidirectional view fragments. * * @param row the row to fill in with views. This is assumed * to be empty on entry. * @param pos The current position in the children of * this views element from which to start. * @return the position to start the next row */ protected int layoutRow(FlowView fv, int rowIndex, int p0) { int p1 = super.layoutRow(fv, rowIndex, p0); View row = fv.getView(rowIndex); Document doc = fv.getDocument(); Object i18nFlag = doc.getProperty(AbstractDocument.I18NProperty); if ((i18nFlag != null) && i18nFlag.equals(Boolean.TRUE)) { int n = row.getViewCount(); if (n > 1) { AbstractDocument d = (AbstractDocument)fv.getDocument(); Element bidiRoot = d.getBidiRootElement(); byte[] levels = new byte[n]; View[] reorder = new View[n]; for( int i=0; i<n; i++ ) { View v = row.getView(i); int bidiIndex =bidiRoot.getElementIndex(v.getStartOffset()); Element bidiElem = bidiRoot.getElement( bidiIndex ); levels[i] = (byte)StyleConstants.getBidiLevel(bidiElem.getAttributes()); reorder[i] = v; } BidiUtils.reorderVisually( levels, reorder ); row.replace(0, n, reorder); } } return p1; }
Example 4
Source File: TextLayoutStrategy.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
/** * Creates a row of views that will fit within the * layout span of the row. This is implemented to execute the * superclass functionality (which fills the row with child * views or view fragments) and follow that with bidi reordering * of the unidirectional view fragments. * * @param row the row to fill in with views. This is assumed * to be empty on entry. * @param pos The current position in the children of * this views element from which to start. * @return the position to start the next row */ protected int layoutRow(FlowView fv, int rowIndex, int p0) { int p1 = super.layoutRow(fv, rowIndex, p0); View row = fv.getView(rowIndex); Document doc = fv.getDocument(); Object i18nFlag = doc.getProperty(AbstractDocument.I18NProperty); if ((i18nFlag != null) && i18nFlag.equals(Boolean.TRUE)) { int n = row.getViewCount(); if (n > 1) { AbstractDocument d = (AbstractDocument)fv.getDocument(); Element bidiRoot = d.getBidiRootElement(); byte[] levels = new byte[n]; View[] reorder = new View[n]; for( int i=0; i<n; i++ ) { View v = row.getView(i); int bidiIndex =bidiRoot.getElementIndex(v.getStartOffset()); Element bidiElem = bidiRoot.getElement( bidiIndex ); levels[i] = (byte)StyleConstants.getBidiLevel(bidiElem.getAttributes()); reorder[i] = v; } BidiUtils.reorderVisually( levels, reorder ); row.replace(0, n, reorder); } } return p1; }
Example 5
Source File: TextLayoutStrategy.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Creates a row of views that will fit within the * layout span of the row. This is implemented to execute the * superclass functionality (which fills the row with child * views or view fragments) and follow that with bidi reordering * of the unidirectional view fragments. * * @param row the row to fill in with views. This is assumed * to be empty on entry. * @param pos The current position in the children of * this views element from which to start. * @return the position to start the next row */ protected int layoutRow(FlowView fv, int rowIndex, int p0) { int p1 = super.layoutRow(fv, rowIndex, p0); View row = fv.getView(rowIndex); Document doc = fv.getDocument(); Object i18nFlag = doc.getProperty(AbstractDocument.I18NProperty); if ((i18nFlag != null) && i18nFlag.equals(Boolean.TRUE)) { int n = row.getViewCount(); if (n > 1) { AbstractDocument d = (AbstractDocument)fv.getDocument(); Element bidiRoot = d.getBidiRootElement(); byte[] levels = new byte[n]; View[] reorder = new View[n]; for( int i=0; i<n; i++ ) { View v = row.getView(i); int bidiIndex =bidiRoot.getElementIndex(v.getStartOffset()); Element bidiElem = bidiRoot.getElement( bidiIndex ); levels[i] = (byte)StyleConstants.getBidiLevel(bidiElem.getAttributes()); reorder[i] = v; } BidiUtils.reorderVisually( levels, reorder ); row.replace(0, n, reorder); } } return p1; }
Example 6
Source File: TextLayoutStrategy.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Creates a row of views that will fit within the * layout span of the row. This is implemented to execute the * superclass functionality (which fills the row with child * views or view fragments) and follow that with bidi reordering * of the unidirectional view fragments. * * @param row the row to fill in with views. This is assumed * to be empty on entry. * @param pos The current position in the children of * this views element from which to start. * @return the position to start the next row */ protected int layoutRow(FlowView fv, int rowIndex, int p0) { int p1 = super.layoutRow(fv, rowIndex, p0); View row = fv.getView(rowIndex); Document doc = fv.getDocument(); Object i18nFlag = doc.getProperty(AbstractDocument.I18NProperty); if ((i18nFlag != null) && i18nFlag.equals(Boolean.TRUE)) { int n = row.getViewCount(); if (n > 1) { AbstractDocument d = (AbstractDocument)fv.getDocument(); Element bidiRoot = d.getBidiRootElement(); byte[] levels = new byte[n]; View[] reorder = new View[n]; for( int i=0; i<n; i++ ) { View v = row.getView(i); int bidiIndex =bidiRoot.getElementIndex(v.getStartOffset()); Element bidiElem = bidiRoot.getElement( bidiIndex ); levels[i] = (byte)StyleConstants.getBidiLevel(bidiElem.getAttributes()); reorder[i] = v; } BidiUtils.reorderVisually( levels, reorder ); row.replace(0, n, reorder); } } return p1; }
Example 7
Source File: TextLayoutStrategy.java From hottub with GNU General Public License v2.0 | 5 votes |
/** * Creates a row of views that will fit within the * layout span of the row. This is implemented to execute the * superclass functionality (which fills the row with child * views or view fragments) and follow that with bidi reordering * of the unidirectional view fragments. * * @param row the row to fill in with views. This is assumed * to be empty on entry. * @param pos The current position in the children of * this views element from which to start. * @return the position to start the next row */ protected int layoutRow(FlowView fv, int rowIndex, int p0) { int p1 = super.layoutRow(fv, rowIndex, p0); View row = fv.getView(rowIndex); Document doc = fv.getDocument(); Object i18nFlag = doc.getProperty(AbstractDocument.I18NProperty); if ((i18nFlag != null) && i18nFlag.equals(Boolean.TRUE)) { int n = row.getViewCount(); if (n > 1) { AbstractDocument d = (AbstractDocument)fv.getDocument(); Element bidiRoot = d.getBidiRootElement(); byte[] levels = new byte[n]; View[] reorder = new View[n]; for( int i=0; i<n; i++ ) { View v = row.getView(i); int bidiIndex =bidiRoot.getElementIndex(v.getStartOffset()); Element bidiElem = bidiRoot.getElement( bidiIndex ); levels[i] = (byte)StyleConstants.getBidiLevel(bidiElem.getAttributes()); reorder[i] = v; } BidiUtils.reorderVisually( levels, reorder ); row.replace(0, n, reorder); } } return p1; }
Example 8
Source File: TextLayoutStrategy.java From Java8CN with Apache License 2.0 | 5 votes |
/** * Creates a row of views that will fit within the * layout span of the row. This is implemented to execute the * superclass functionality (which fills the row with child * views or view fragments) and follow that with bidi reordering * of the unidirectional view fragments. * * @param row the row to fill in with views. This is assumed * to be empty on entry. * @param pos The current position in the children of * this views element from which to start. * @return the position to start the next row */ protected int layoutRow(FlowView fv, int rowIndex, int p0) { int p1 = super.layoutRow(fv, rowIndex, p0); View row = fv.getView(rowIndex); Document doc = fv.getDocument(); Object i18nFlag = doc.getProperty(AbstractDocument.I18NProperty); if ((i18nFlag != null) && i18nFlag.equals(Boolean.TRUE)) { int n = row.getViewCount(); if (n > 1) { AbstractDocument d = (AbstractDocument)fv.getDocument(); Element bidiRoot = d.getBidiRootElement(); byte[] levels = new byte[n]; View[] reorder = new View[n]; for( int i=0; i<n; i++ ) { View v = row.getView(i); int bidiIndex =bidiRoot.getElementIndex(v.getStartOffset()); Element bidiElem = bidiRoot.getElement( bidiIndex ); levels[i] = (byte)StyleConstants.getBidiLevel(bidiElem.getAttributes()); reorder[i] = v; } BidiUtils.reorderVisually( levels, reorder ); row.replace(0, n, reorder); } } return p1; }
Example 9
Source File: TextLayoutStrategy.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Creates a row of views that will fit within the * layout span of the row. This is implemented to execute the * superclass functionality (which fills the row with child * views or view fragments) and follow that with bidi reordering * of the unidirectional view fragments. * * @param row the row to fill in with views. This is assumed * to be empty on entry. * @param pos The current position in the children of * this views element from which to start. * @return the position to start the next row */ protected int layoutRow(FlowView fv, int rowIndex, int p0) { int p1 = super.layoutRow(fv, rowIndex, p0); View row = fv.getView(rowIndex); Document doc = fv.getDocument(); Object i18nFlag = doc.getProperty(AbstractDocument.I18NProperty); if ((i18nFlag != null) && i18nFlag.equals(Boolean.TRUE)) { int n = row.getViewCount(); if (n > 1) { AbstractDocument d = (AbstractDocument)fv.getDocument(); Element bidiRoot = d.getBidiRootElement(); byte[] levels = new byte[n]; View[] reorder = new View[n]; for( int i=0; i<n; i++ ) { View v = row.getView(i); int bidiIndex =bidiRoot.getElementIndex(v.getStartOffset()); Element bidiElem = bidiRoot.getElement( bidiIndex ); levels[i] = (byte)StyleConstants.getBidiLevel(bidiElem.getAttributes()); reorder[i] = v; } BidiUtils.reorderVisually( levels, reorder ); row.replace(0, n, reorder); } } return p1; }
Example 10
Source File: TextLayoutStrategy.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
/** * Creates a row of views that will fit within the * layout span of the row. This is implemented to execute the * superclass functionality (which fills the row with child * views or view fragments) and follow that with bidi reordering * of the unidirectional view fragments. * * @param row the row to fill in with views. This is assumed * to be empty on entry. * @param pos The current position in the children of * this views element from which to start. * @return the position to start the next row */ protected int layoutRow(FlowView fv, int rowIndex, int p0) { int p1 = super.layoutRow(fv, rowIndex, p0); View row = fv.getView(rowIndex); Document doc = fv.getDocument(); Object i18nFlag = doc.getProperty(AbstractDocument.I18NProperty); if ((i18nFlag != null) && i18nFlag.equals(Boolean.TRUE)) { int n = row.getViewCount(); if (n > 1) { AbstractDocument d = (AbstractDocument)fv.getDocument(); Element bidiRoot = d.getBidiRootElement(); byte[] levels = new byte[n]; View[] reorder = new View[n]; for( int i=0; i<n; i++ ) { View v = row.getView(i); int bidiIndex =bidiRoot.getElementIndex(v.getStartOffset()); Element bidiElem = bidiRoot.getElement( bidiIndex ); levels[i] = (byte)StyleConstants.getBidiLevel(bidiElem.getAttributes()); reorder[i] = v; } BidiUtils.reorderVisually( levels, reorder ); row.replace(0, n, reorder); } } return p1; }
Example 11
Source File: TextLayoutStrategy.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * Creates a row of views that will fit within the * layout span of the row. This is implemented to execute the * superclass functionality (which fills the row with child * views or view fragments) and follow that with bidi reordering * of the unidirectional view fragments. * * @param rowIndex the row to fill in with views. This is assumed * to be empty on entry. * @param p0 The current position in the children of * this views element from which to start. * @return the position to start the next row */ protected int layoutRow(FlowView fv, int rowIndex, int p0) { int p1 = super.layoutRow(fv, rowIndex, p0); View row = fv.getView(rowIndex); Document doc = fv.getDocument(); Object i18nFlag = doc.getProperty(AbstractDocument.I18NProperty); if ((i18nFlag != null) && i18nFlag.equals(Boolean.TRUE)) { int n = row.getViewCount(); if (n > 1) { AbstractDocument d = (AbstractDocument)fv.getDocument(); Element bidiRoot = d.getBidiRootElement(); byte[] levels = new byte[n]; View[] reorder = new View[n]; for( int i=0; i<n; i++ ) { View v = row.getView(i); int bidiIndex =bidiRoot.getElementIndex(v.getStartOffset()); Element bidiElem = bidiRoot.getElement( bidiIndex ); levels[i] = (byte)StyleConstants.getBidiLevel(bidiElem.getAttributes()); reorder[i] = v; } BidiUtils.reorderVisually( levels, reorder ); row.replace(0, n, reorder); } } return p1; }
Example 12
Source File: TextLayoutStrategy.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Creates a row of views that will fit within the * layout span of the row. This is implemented to execute the * superclass functionality (which fills the row with child * views or view fragments) and follow that with bidi reordering * of the unidirectional view fragments. * * @param row the row to fill in with views. This is assumed * to be empty on entry. * @param pos The current position in the children of * this views element from which to start. * @return the position to start the next row */ protected int layoutRow(FlowView fv, int rowIndex, int p0) { int p1 = super.layoutRow(fv, rowIndex, p0); View row = fv.getView(rowIndex); Document doc = fv.getDocument(); Object i18nFlag = doc.getProperty(AbstractDocument.I18NProperty); if ((i18nFlag != null) && i18nFlag.equals(Boolean.TRUE)) { int n = row.getViewCount(); if (n > 1) { AbstractDocument d = (AbstractDocument)fv.getDocument(); Element bidiRoot = d.getBidiRootElement(); byte[] levels = new byte[n]; View[] reorder = new View[n]; for( int i=0; i<n; i++ ) { View v = row.getView(i); int bidiIndex =bidiRoot.getElementIndex(v.getStartOffset()); Element bidiElem = bidiRoot.getElement( bidiIndex ); levels[i] = (byte)StyleConstants.getBidiLevel(bidiElem.getAttributes()); reorder[i] = v; } BidiUtils.reorderVisually( levels, reorder ); row.replace(0, n, reorder); } } return p1; }
Example 13
Source File: TextLayoutStrategy.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Creates a row of views that will fit within the * layout span of the row. This is implemented to execute the * superclass functionality (which fills the row with child * views or view fragments) and follow that with bidi reordering * of the unidirectional view fragments. * * @param row the row to fill in with views. This is assumed * to be empty on entry. * @param pos The current position in the children of * this views element from which to start. * @return the position to start the next row */ protected int layoutRow(FlowView fv, int rowIndex, int p0) { int p1 = super.layoutRow(fv, rowIndex, p0); View row = fv.getView(rowIndex); Document doc = fv.getDocument(); Object i18nFlag = doc.getProperty(AbstractDocument.I18NProperty); if ((i18nFlag != null) && i18nFlag.equals(Boolean.TRUE)) { int n = row.getViewCount(); if (n > 1) { AbstractDocument d = (AbstractDocument)fv.getDocument(); Element bidiRoot = d.getBidiRootElement(); byte[] levels = new byte[n]; View[] reorder = new View[n]; for( int i=0; i<n; i++ ) { View v = row.getView(i); int bidiIndex =bidiRoot.getElementIndex(v.getStartOffset()); Element bidiElem = bidiRoot.getElement( bidiIndex ); levels[i] = (byte)StyleConstants.getBidiLevel(bidiElem.getAttributes()); reorder[i] = v; } BidiUtils.reorderVisually( levels, reorder ); row.replace(0, n, reorder); } } return p1; }
Example 14
Source File: TextLayoutStrategy.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * Creates a row of views that will fit within the * layout span of the row. This is implemented to execute the * superclass functionality (which fills the row with child * views or view fragments) and follow that with bidi reordering * of the unidirectional view fragments. * * @param row the row to fill in with views. This is assumed * to be empty on entry. * @param pos The current position in the children of * this views element from which to start. * @return the position to start the next row */ protected int layoutRow(FlowView fv, int rowIndex, int p0) { int p1 = super.layoutRow(fv, rowIndex, p0); View row = fv.getView(rowIndex); Document doc = fv.getDocument(); Object i18nFlag = doc.getProperty(AbstractDocument.I18NProperty); if ((i18nFlag != null) && i18nFlag.equals(Boolean.TRUE)) { int n = row.getViewCount(); if (n > 1) { AbstractDocument d = (AbstractDocument)fv.getDocument(); Element bidiRoot = d.getBidiRootElement(); byte[] levels = new byte[n]; View[] reorder = new View[n]; for( int i=0; i<n; i++ ) { View v = row.getView(i); int bidiIndex =bidiRoot.getElementIndex(v.getStartOffset()); Element bidiElem = bidiRoot.getElement( bidiIndex ); levels[i] = (byte)StyleConstants.getBidiLevel(bidiElem.getAttributes()); reorder[i] = v; } BidiUtils.reorderVisually( levels, reorder ); row.replace(0, n, reorder); } } return p1; }
Example 15
Source File: TextLayoutStrategy.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Creates a row of views that will fit within the * layout span of the row. This is implemented to execute the * superclass functionality (which fills the row with child * views or view fragments) and follow that with bidi reordering * of the unidirectional view fragments. * * @param row the row to fill in with views. This is assumed * to be empty on entry. * @param pos The current position in the children of * this views element from which to start. * @return the position to start the next row */ protected int layoutRow(FlowView fv, int rowIndex, int p0) { int p1 = super.layoutRow(fv, rowIndex, p0); View row = fv.getView(rowIndex); Document doc = fv.getDocument(); Object i18nFlag = doc.getProperty(AbstractDocument.I18NProperty); if ((i18nFlag != null) && i18nFlag.equals(Boolean.TRUE)) { int n = row.getViewCount(); if (n > 1) { AbstractDocument d = (AbstractDocument)fv.getDocument(); Element bidiRoot = d.getBidiRootElement(); byte[] levels = new byte[n]; View[] reorder = new View[n]; for( int i=0; i<n; i++ ) { View v = row.getView(i); int bidiIndex =bidiRoot.getElementIndex(v.getStartOffset()); Element bidiElem = bidiRoot.getElement( bidiIndex ); levels[i] = (byte)StyleConstants.getBidiLevel(bidiElem.getAttributes()); reorder[i] = v; } BidiUtils.reorderVisually( levels, reorder ); row.replace(0, n, reorder); } } return p1; }
Example 16
Source File: TextLayoutStrategy.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Creates a row of views that will fit within the * layout span of the row. This is implemented to execute the * superclass functionality (which fills the row with child * views or view fragments) and follow that with bidi reordering * of the unidirectional view fragments. * * @param row the row to fill in with views. This is assumed * to be empty on entry. * @param pos The current position in the children of * this views element from which to start. * @return the position to start the next row */ protected int layoutRow(FlowView fv, int rowIndex, int p0) { int p1 = super.layoutRow(fv, rowIndex, p0); View row = fv.getView(rowIndex); Document doc = fv.getDocument(); Object i18nFlag = doc.getProperty(AbstractDocument.I18NProperty); if ((i18nFlag != null) && i18nFlag.equals(Boolean.TRUE)) { int n = row.getViewCount(); if (n > 1) { AbstractDocument d = (AbstractDocument)fv.getDocument(); Element bidiRoot = d.getBidiRootElement(); byte[] levels = new byte[n]; View[] reorder = new View[n]; for( int i=0; i<n; i++ ) { View v = row.getView(i); int bidiIndex =bidiRoot.getElementIndex(v.getStartOffset()); Element bidiElem = bidiRoot.getElement( bidiIndex ); levels[i] = (byte)StyleConstants.getBidiLevel(bidiElem.getAttributes()); reorder[i] = v; } BidiUtils.reorderVisually( levels, reorder ); row.replace(0, n, reorder); } } return p1; }
Example 17
Source File: TextLayoutStrategy.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
/** * Creates a row of views that will fit within the * layout span of the row. This is implemented to execute the * superclass functionality (which fills the row with child * views or view fragments) and follow that with bidi reordering * of the unidirectional view fragments. * * @param row the row to fill in with views. This is assumed * to be empty on entry. * @param pos The current position in the children of * this views element from which to start. * @return the position to start the next row */ protected int layoutRow(FlowView fv, int rowIndex, int p0) { int p1 = super.layoutRow(fv, rowIndex, p0); View row = fv.getView(rowIndex); Document doc = fv.getDocument(); Object i18nFlag = doc.getProperty(AbstractDocument.I18NProperty); if ((i18nFlag != null) && i18nFlag.equals(Boolean.TRUE)) { int n = row.getViewCount(); if (n > 1) { AbstractDocument d = (AbstractDocument)fv.getDocument(); Element bidiRoot = d.getBidiRootElement(); byte[] levels = new byte[n]; View[] reorder = new View[n]; for( int i=0; i<n; i++ ) { View v = row.getView(i); int bidiIndex =bidiRoot.getElementIndex(v.getStartOffset()); Element bidiElem = bidiRoot.getElement( bidiIndex ); levels[i] = (byte)StyleConstants.getBidiLevel(bidiElem.getAttributes()); reorder[i] = v; } BidiUtils.reorderVisually( levels, reorder ); row.replace(0, n, reorder); } } return p1; }