Ejemplo n.º 1
0
  @Override
  public void refreshView(List<Exception> exceptions) {

    EventDefinition.refreshMaxPassPrefsEventInfo();

    Stock viewStateParams = hightlitedEventModel.getViewParamRoot();
    if (viewStateParams != null) {
      checkChartSelectionValidity();
      chartDisplayStrategy.highLight(highligtedId, viewStateParams, false);
    }
    chartDisplayStrategy.refreshView(exceptions);

    if (isVisible()) {
      Shell[] childrenShells = this.getShell().getShells();
      for (Shell child : childrenShells) {
        if (child.getText().contains("Warning")) child.forceActive();
      }
    }
  }
Ejemplo n.º 2
0
  void updateCharts(Boolean grantEventsUpdate) {

    stripedCloseFunction.updateStartDate(slidingStartDate);
    stripedCloseFunction.updateEndDate(slidingEndDate);

    int previousSelection = retreivePreviousSelection();
    if (previousSelection != -1) {
      getHightlitedEventModel()
          .setViewParamRoot(getCurrentTabShareList().get(previousSelection).getStock());
      setHighligtedId(previousSelection);
    } else {
      getHightlitedEventModel().resetOtherViewParams();
      setHighligtedId(null);
    }
    chartDisplayStrategy.resetChart(false);

    Stock viewStateParams = hightlitedEventModel.getViewParamRoot();
    if (viewStateParams != null) {
      chartDisplayStrategy.highLight(getHighligtedId(), viewStateParams, grantEventsUpdate);
    }
  }
Ejemplo n.º 3
0
  public ChartsComposite(Composite parent, int style, LogComposite logComposite) {
    super(parent, style);

    this.currentTabShareList = new ArrayList<SlidingPortfolioShare>();

    this.slidingEndDate = DateFactory.midnithDate(EventSignalConfig.getNewDate());
    Calendar calendar = Calendar.getInstance();
    calendar.add(Calendar.YEAR, -1);
    this.slidingStartDate = DateFactory.midnithDate(calendar.getTime());

    this.logComposite = logComposite;
    this.hightlitedEventModel = EventModel.getInstance(new RefreshChartHighlighted(), logComposite);

    this.chartedEvtDefsTrends = initChartedEvtDefsTrendsSet();
    this.chartedEvtDef = EventDefinition.ZERO;

    this.sliderSelection = false;

    this.stripedCloseFunction = new StripedCloseRelativeToStart(slidingStartDate, slidingEndDate);
    this.initGUI();
    chartDisplayStrategy = new ChartPerfDisplay(this);
  }