List of usage examples for java.lang Boolean TRUE
Boolean TRUE
To view the source code for java.lang Boolean TRUE.
Click Source Link
From source file:Main.java
/** * Enforces JEditorPane font.//from ww w . java2 s .co m * Once the content type of a JEditorPane is set to text/html the font on the Pane starts to be managed by Swing. * This method forces using provided font. */ public static void enforceJEditorPaneFont(JEditorPane jEditorPane, Font font) { jEditorPane.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, Boolean.TRUE); jEditorPane.setFont(font); }
From source file:Main.java
public static Marshaller getMarshaller(Class jaxbClass) throws JAXBException { JAXBContext jaxbContext = JAXBContext.newInstance(jaxbClass); Marshaller marshaller = jaxbContext.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE); return marshaller; }
From source file:Main.java
/** * See if the user has added appcompat-v7 with AppCompatViews * * @return true if AppcompatTextView is on the classpath */// w w w . j a va 2 s. c o m static boolean canAddV7AppCompatViews() { if (sAppCompatViewCheck == null) { try { Class.forName("android.support.v7.widget.AppCompatTextView"); sAppCompatViewCheck = Boolean.TRUE; } catch (ClassNotFoundException e) { sAppCompatViewCheck = Boolean.FALSE; } } return sAppCompatViewCheck; }
From source file:Main.java
public static File Marshall(Object object, String filePath) throws JAXBException { JAXBContext jc = JAXBContext.newInstance(object.getClass()); Marshaller u = jc.createMarshaller(); u.setProperty(Marshaller.JAXB_ENCODING, "UTF-8"); u.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); File f = new File(filePath); u.marshal(object, f);// ww w .j a v a2s .c o m return f; }
From source file:Main.java
public static String objectToXML(Class clazz, Object object) throws JAXBException { String xml = null;// w ww. ja v a2 s. com JAXBContext context = JAXBContext.newInstance(clazz); Marshaller m = context.createMarshaller(); m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); Writer w = new StringWriter(); m.marshal(object, w); xml = w.toString(); return xml; }
From source file:Main.java
public static void enableToolBar(JToolBar panel, Class<?>... classesToIgnore) { for (Component component : panel.getComponents()) { if (!ignoreClasses(component, classesToIgnore)) { Method m = discover(component, "setEnabled", boolean.class); invoke(m, component, new Object[] { Boolean.TRUE }); }/* w w w. j a va 2s .c om*/ } }
From source file:Main.java
public static void writeXML(Class<?> class1, Object obj, File outputFile) throws JAXBException, FileNotFoundException { JAXBContext context = JAXBContext.newInstance(class1); Marshaller m = context.createMarshaller(); m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); m.marshal(obj, outputFile);/*from w w w . j a v a 2 s .c o m*/ }
From source file:Main.java
public static boolean isWhiteSpace(char c) { boolean out = Boolean.TRUE; for (Character cr : WHITE_SPACE) { if (cr.equals(c)) { out = Boolean.FALSE;/*from www.j av a 2s .co m*/ break; } } return out; }
From source file:Main.java
/** * See if the user has added appcompat-v7, this is done at runtime, so we only check once. * * @return true if the v7.Toolbar is on the classpath *//*from w w w. j a va 2 s . c o m*/ static boolean canCheckForV7Toolbar() { if (sToolbarCheck == null) { try { Class.forName("android.support.v7.widget.Toolbar"); sToolbarCheck = Boolean.TRUE; } catch (ClassNotFoundException e) { sToolbarCheck = Boolean.FALSE; } } return sToolbarCheck; }
From source file:Main.java
public static <T> void JAXBMarshalling(T object, File output) throws JAXBException { JAXBContext jAXBContext = JAXBContext.newInstance(object.getClass()); Marshaller marshaller = jAXBContext.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8"); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); marshaller.marshal(object, output);//from w w w.j ava 2 s.com }