Пример #1
0
 private static void setTemporaryResize(boolean value) {
   ServiceStore serviceStore = ContextProvider.getServiceStore();
   if (value) {
     serviceStore.setAttribute(TEMPORARY_RESIZE, Boolean.TRUE);
   } else {
     serviceStore.removeAttribute(TEMPORARY_RESIZE);
   }
 }
Пример #2
0
 @SuppressWarnings("unchecked")
 public static void add(Widget widget) {
   ServiceStore serviceStore = ContextProvider.getServiceStore();
   List<Widget> disposalList = (List<Widget>) serviceStore.getAttribute(DISPOSAL_LIST);
   if (disposalList == null) {
     disposalList = new LinkedList<Widget>();
     serviceStore.setAttribute(DISPOSAL_LIST, disposalList);
   }
   disposalList.add(widget);
 }
Пример #3
0
 @SuppressWarnings("unchecked")
 public static Widget[] getAll() {
   Widget[] result;
   ServiceStore serviceStore = ContextProvider.getServiceStore();
   List<Widget> disposalList = (List<Widget>) serviceStore.getAttribute(DISPOSAL_LIST);
   if (disposalList == null) {
     result = new Widget[0];
   } else {
     result = new Widget[disposalList.size()];
     disposalList.toArray(result);
   }
   return result;
 }