Search in sources :

Example 86 with BXMLSerializer

use of org.apache.pivot.beans.BXMLSerializer in project pivot by apache.

the class StockTracker method startup.

@Override
public void startup(Display display, Map<String, String> properties) throws Exception {
    String language = properties.get(LANGUAGE_KEY);
    Locale locale = (language == null) ? Locale.getDefault() : new Locale(language);
    Resources resources = new Resources(StockTrackerWindow.class.getName(), locale);
    BXMLSerializer bxmlSerializer = new BXMLSerializer();
    window = (StockTrackerWindow) bxmlSerializer.readObject(getClass().getResource("stock_tracker_window.bxml"), resources);
    window.open(display);
}
Also used : Locale(java.util.Locale) Resources(org.apache.pivot.util.Resources) BXMLSerializer(org.apache.pivot.beans.BXMLSerializer)

Aggregations

BXMLSerializer (org.apache.pivot.beans.BXMLSerializer)86 Component (org.apache.pivot.wtk.Component)24 IOException (java.io.IOException)19 SerializationException (org.apache.pivot.serialization.SerializationException)14 Window (org.apache.pivot.wtk.Window)13 Button (org.apache.pivot.wtk.Button)11 PushButton (org.apache.pivot.wtk.PushButton)11 File (java.io.File)9 ButtonPressListener (org.apache.pivot.wtk.ButtonPressListener)9 Frame (org.apache.pivot.wtk.Frame)8 TextInput (org.apache.pivot.wtk.TextInput)8 ArrayList (org.apache.pivot.collections.ArrayList)7 List (org.apache.pivot.collections.List)7 Mouse (org.apache.pivot.wtk.Mouse)6 Sequence (org.apache.pivot.collections.Sequence)5 ComponentMouseButtonListener (org.apache.pivot.wtk.ComponentMouseButtonListener)5 ListButton (org.apache.pivot.wtk.ListButton)5 TextInputContentListener (org.apache.pivot.wtk.TextInputContentListener)5 URL (java.net.URL)4 MalformedURLException (java.net.MalformedURLException)3