コード例 #1
0
ファイル: ChartsComposite.java プロジェクト: c0debrain/pm
  @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();
      }
    }
  }
コード例 #2
0
ファイル: ChartsComposite.java プロジェクト: c0debrain/pm
  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);
    }
  }
コード例 #3
0
ファイル: ChartsComposite.java プロジェクト: c0debrain/pm
  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);
  }