Java 类javax.swing.text.FieldView 实例源码
项目:cn1
文件:BasicTextFieldUI.java
public View create(final Element elem) {
if (elem == null) {
return null;
}
Document doc = elem.getDocument();
Boolean i18n = (Boolean)doc.getProperty(StringConstants.BIDI_PROPERTY);
if (i18n.booleanValue()) {
return (View)AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
try {
Class cls = Class.forName(FIELD_VIEW_I18N_CLASS);
Constructor constructor =
cls.getConstructor(new Class[] {Element.class});
constructor.setAccessible(true);
return constructor.newInstance(new Object[] {elem});
} catch (Exception e) {
return null;
}
}
});
}
return new FieldView(elem);
}
项目:freeVM
文件:BasicTextFieldUI.java
public View create(final Element elem) {
if (elem == null) {
return null;
}
Document doc = elem.getDocument();
Boolean i18n = (Boolean)doc.getProperty(StringConstants.BIDI_PROPERTY);
if (i18n.booleanValue()) {
return (View)AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
try {
Class cls = Class.forName(FIELD_VIEW_I18N_CLASS);
Constructor constructor =
cls.getConstructor(new Class[] {Element.class});
constructor.setAccessible(true);
return constructor.newInstance(new Object[] {elem});
} catch (Exception e) {
return null;
}
}
});
}
return new FieldView(elem);
}
项目:freeVM
文件:BasicTextFieldUI.java
public View create(final Element elem) {
if (elem == null) {
return null;
}
Document doc = elem.getDocument();
Boolean i18n = (Boolean)doc.getProperty(StringConstants.BIDI_PROPERTY);
if (i18n.booleanValue()) {
return (View)AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
try {
Class cls = Class.forName(FIELD_VIEW_I18N_CLASS);
Constructor constructor =
cls.getConstructor(new Class[] {Element.class});
constructor.setAccessible(true);
return constructor.newInstance(new Object[] {elem});
} catch (Exception e) {
return null;
}
}
});
}
return new FieldView(elem);
}
项目:cn1
文件:BasicTextFieldUITest.java
public void testCreateElement() {
Element element = jtf.getDocument().getDefaultRootElement();
View view = ui.create(element);
assertTrue(view instanceof FieldView);
element = element.getElement(0);
view = ui.create(element);
assertTrue(view instanceof FieldView);
/* no view support for bidi text
ui = (BasicTextFieldUI)jtfBidi.getUI();
element = jtfBidi.getDocument().getDefaultRootElement();
view = ui.create(element);
assertFalse(view instanceof FieldView);
*/
}
项目:freeVM
文件:BasicTextFieldUITest.java
public void testCreateElement() {
Element element = jtf.getDocument().getDefaultRootElement();
View view = ui.create(element);
assertTrue(view instanceof FieldView);
element = element.getElement(0);
view = ui.create(element);
assertTrue(view instanceof FieldView);
/* no view support for bidi text
ui = (BasicTextFieldUI)jtfBidi.getUI();
element = jtfBidi.getDocument().getDefaultRootElement();
view = ui.create(element);
assertFalse(view instanceof FieldView);
*/
}
项目:freeVM
文件:BasicTextFieldUITest.java
public void testCreateElement() {
Element element = jtf.getDocument().getDefaultRootElement();
View view = ui.create(element);
assertTrue(view instanceof FieldView);
element = element.getElement(0);
view = ui.create(element);
assertTrue(view instanceof FieldView);
/* no view support for bidi text
ui = (BasicTextFieldUI)jtfBidi.getUI();
element = jtfBidi.getDocument().getDefaultRootElement();
view = ui.create(element);
assertFalse(view instanceof FieldView);
*/
}
项目:javify
文件:BasicTextFieldUI.java
public View create(Element elem)
{
return new FieldView(elem);
}
项目:jvm-stm
文件:BasicTextFieldUI.java
public View create(Element elem)
{
return new FieldView(elem);
}
项目:JamVM-PH
文件:BasicTextFieldUI.java
public View create(Element elem)
{
return new FieldView(elem);
}
项目:classpath
文件:BasicTextFieldUI.java
public View create(Element elem)
{
return new FieldView(elem);
}