コード例 #1
0
 public void localeChanged() {
   if (tabViews != null && tabViews.size() > 0) {
     for (int i = 0; i < tabViews.size(); i++) {
       UISWTViewCore view = tabViews.get(i);
       if (view != null) {
         view.triggerEvent(UISWTViewEvent.TYPE_LANGUAGEUPDATE, null);
       }
     }
   }
 }
コード例 #2
0
 public void delete() {
   if (tabViews != null && tabViews.size() > 0) {
     for (int i = 0; i < tabViews.size(); i++) {
       UISWTViewCore view = tabViews.get(i);
       if (view != null) {
         view.triggerEvent(UISWTViewEvent.TYPE_DESTROY, null);
       }
     }
   }
 }
コード例 #3
0
  public void triggerTabViewsDataSourceChanged(boolean sendParent) {
    if (tabViews == null || tabViews.size() == 0) {
      return;
    }

    if (sendParent) {
      for (int i = 0; i < tabViews.size(); i++) {
        UISWTViewCore view = tabViews.get(i);
        if (view != null) {
          view.triggerEvent(UISWTViewEvent.TYPE_DATASOURCE_CHANGED, tv.getParentDataSource());
        }
      }
      return;
    }

    // Set Data Object for all tabs.

    Object[] dataSourcesCore = tv.getSelectedDataSources(true);
    Object[] dataSourcesPlugin = null;

    for (int i = 0; i < tabViews.size(); i++) {
      UISWTViewCore view = tabViews.get(i);
      if (view != null) {
        if (view.useCoreDataSource()) {
          view.triggerEvent(
              UISWTViewEvent.TYPE_DATASOURCE_CHANGED,
              dataSourcesCore.length == 0 ? tv.getParentDataSource() : dataSourcesCore);
        } else {
          if (dataSourcesPlugin == null) {
            dataSourcesPlugin = tv.getSelectedDataSources(false);
          }

          view.triggerEvent(
              UISWTViewEvent.TYPE_DATASOURCE_CHANGED,
              dataSourcesPlugin.length == 0
                  ? PluginCoreUtils.convert(tv.getParentDataSource(), false)
                  : dataSourcesPlugin);
        }
      }
    }
  }
コード例 #4
0
  public void triggerTabViewDataSourceChanged(UISWTViewCore view) {
    if (view != null) {
      view.triggerEvent(UISWTViewEvent.TYPE_DATASOURCE_CHANGED, tv.getParentDataSource());

      if (view.useCoreDataSource()) {
        Object[] dataSourcesCore = tv.getSelectedDataSources(true);
        if (dataSourcesCore.length > 0) {
          view.triggerEvent(
              UISWTViewEvent.TYPE_DATASOURCE_CHANGED,
              dataSourcesCore.length == 0 ? tv.getParentDataSource() : dataSourcesCore);
        }
      } else {
        Object[] dataSourcesPlugin = tv.getSelectedDataSources(false);
        if (dataSourcesPlugin.length > 0) {
          view.triggerEvent(
              UISWTViewEvent.TYPE_DATASOURCE_CHANGED,
              dataSourcesPlugin.length == 0
                  ? PluginCoreUtils.convert(tv.getParentDataSource(), false)
                  : dataSourcesPlugin);
        }
      }
    }
  }
コード例 #5
0
 public void refreshSelectedSubView() {
   UISWTViewCore view = getActiveSubView();
   if (view != null && view.getComposite().isVisible()) {
     view.triggerEvent(UISWTViewEvent.TYPE_REFRESH, null);
   }
 }