19 package com.generalrobotix.ui.item;
21 import java.util.ArrayList;
23 import org.w3c.dom.Element;
24 import org.w3c.dom.NodeList;
33 @SuppressWarnings(
"serial")
38 public static final String TITLE =
"Mode Info";
40 public ArrayList<Class<? extends GrxBaseItem>> activeItemClassList_ =
new ArrayList<Class<? extends GrxBaseItem>>();
41 public ArrayList<Class<? extends GrxBaseView>> activeViewClassList_ =
new ArrayList<Class<? extends GrxBaseView>>();
49 if ( GrxBaseItem.class.isAssignableFrom(item) && !activeItemClassList_.contains(item)) {
50 activeItemClassList_.add((Class<? extends GrxBaseItem>)item);
54 @SuppressWarnings(
"unchecked")
55 public
void restoreProperties() {
56 super.restoreProperties();
58 NodeList list = element_.getElementsByTagName(
"item");
59 for (
int i = 0;
i < list.getLength();
i++) {
60 Element el = (Element) list.item(
i);
62 Class<?> cls = manager_.registerPlugin(el);
63 if ( cls !=
null && GrxBaseItem.class.isAssignableFrom(cls) &&
64 !activeItemClassList_.contains(cls)) {
65 activeItemClassList_.add((Class<? extends GrxBaseItem>)cls);
70 list = element_.getElementsByTagName(
"view");
71 for (
int i = 0;
i < list.getLength();
i++) {
72 Element el = (Element) list.item(
i);
74 Class cls = manager_.registerPlugin(el.getAttribute(
"class"));
77 !activeViewClassList_.contains(cls)) {
78 activeViewClassList_.add((Class<? extends GrxBaseView>)cls);
79 String
name = el.getAttribute(
"name");
80 name = name.length()>0 ? name:
null;
83 manager_.createView((Class<? extends GrxBaseView>)cls, name);
#define null
our own NULL pointer
png_infop png_charpp name
GrxModeInfoItem(String name, GrxPluginManager manager)
void addItemClassList(Class<?extends GrxBasePlugin > item)
static void println(String s)
static String expandEnvVal(String str)
プラグイン管理クラス GrxUIの核になるクラス。プラグインのロード等の、初期化を実行する。 プラグインとそ...