| javax.swing.BasicSwingTestCase javax.swing.text.ViewRTest
testInsertUpdate01 | public void testInsertUpdate01() throws BadLocationException(Code) | | Tests the case where a mutation occured on element boundaries, so that
both paragraphs changed but the section where these paragraphs lie
is not changed.
In this case the update must be forwarded to these both paragraphs.
In more detail, the document structure for this test is like this:
section
|
+--paragraph
| +--content [0, 5; plain]
| +--content [5, 12; italic\n]
|
+--paragraph
+--content [12, 13; \n] // represents implied new line char
Then an unattributed text, which doesn't contain the new line char,
is inserted at doc.getLength() .
This insert causes the element structure to be rebuild, however
no changes occur to the section element.
Thus change parameter to
forwardUpdate will be null .
|
testInsertUpdate02 | public void testInsertUpdate02() throws BadLocationException(Code) | | Tests the case where a mutation occured on element boundaries, so that
both the existing paragraph needs to rebuild its elements and a new
paragraph is created. Because of the latter, the section is modified
too.
In this case the view must create a new child to represent the new
paragrap as well as notify the previous paragraph so that it updates
itself.
In more detail, the document structure for this test is like this:
section
|
+--paragraph
| +--content [0, 5; plain]
| +--content [5, 12; italic\n]
|
+--paragraph
+--content [12, 19; second ]
+--content [19, 31; italic again]
+--content [31, 32; \n] // represents implied new line char
Then an unattributed text, which contains the new line char,
is inserted at doc.getLength() .
This insert causes the element structure to be rebuild:
- The second paragraph re-creates its last element.
This element is mapped to the inserted text.
- The new paragraph is created, which will contain the
implied new line char.
-
Thus change parameter to
forwardUpdate will be not null .
|
Methods inherited from javax.swing.BasicSwingTestCase | public static void assertEquals(Object[] expected, Object[] actual)(Code)(Java Doc) protected Graphics createTestGraphics()(Code)(Java Doc) protected Component findComponent(Container root, Class> findClass, boolean exactClassMatch)(Code)(Java Doc) protected FontMetrics getFontMetrics(Font fnt)(Code)(Java Doc) protected FontMetrics getFontMetrics(Font fnt, int charWidth)(Code)(Java Doc) protected FontMetrics getFontMetrics(Font fnt, int charWidth, int charHeight)(Code)(Java Doc) protected EventListener getListener(EventListener[] listeners, Class> listenerClass)(Code)(Java Doc) protected boolean hasListener(EventListener[] listeners, Class> listenerClass)(Code)(Java Doc) public static boolean isHarmony()(Code)(Java Doc) protected boolean isSystemWindow(Frame f)(Code)(Java Doc) protected void rethrow(Throwable exception) throws Throwable(Code)(Java Doc) public void runBare() throws Throwable(Code)(Java Doc) protected Throwable runBareImpl() throws Throwable(Code)(Java Doc) protected void runBareSuper() throws Throwable(Code)(Java Doc) public static Object serializeObject(Object objectToWrite) throws IOException, ClassNotFoundException(Code)(Java Doc) public void setIgnoreNotImplemented(boolean b)(Code)(Java Doc) protected void setUp() throws Exception(Code)(Java Doc) protected void tearDown() throws Exception(Code)(Java Doc) protected void testExceptionalCase(ExceptionalCase ec)(Code)(Java Doc) protected void traverseComponentTree(Component root, TraverseAction action)(Code)(Java Doc) protected boolean waitForFocus(Component c) throws Exception(Code)(Java Doc) protected void waitForIdle() throws Exception(Code)(Java Doc)
|
|
|