コード例 #1
0
 public void propertyChange(PropertyChangeEvent pce) {
   if (pce.getPropertyName().equals(RankingUIModel.LIST_VISIBLE)) {
     listButton.setSelected((Boolean) pce.getNewValue());
     if (listResultPanel.isVisible() != model.isListVisible()) {
       listResultPanel.setVisible(model.isListVisible());
       revalidate();
       repaint();
     }
   } else if (pce.getPropertyName().equals(RankingUIModel.BARCHART_VISIBLE)) {
     // barChartButton.setSelected((Boolean)pce.getNewValue());
   }
 }
コード例 #2
0
  public void refreshModel(RankingUIModel model) {
    if (this.model != null) {
      this.model.removePropertyChangeListener(this);
    }
    this.model = model;
    if (model != null) {
      model.addPropertyChangeListener(this);
    }
    refreshEnable();

    // South visible
    /*if (barChartPanel.isVisible() != model.isBarChartVisible()) {
    barChartPanel.setVisible(model.isBarChartVisible());
    revalidate();
    repaint();
    }*/
    ((ResultListPanel) listResultPanel).unselect();
    if (model != null) {
      ((ResultListPanel) listResultPanel).select(model);
      if (listResultPanel.isVisible() != model.isListVisible()) {
        listResultPanel.setVisible(model.isListVisible());
        revalidate();
        repaint();
      }

      // barChartButton.setSelected(model.isBarChartVisible());
      listButton.setSelected(model.isListVisible());
    } else {
      listResultPanel.setVisible(false);
      listButton.setSelected(false);
    }

    // Chooser
    ((RankingChooser) rankingChooser).refreshModel(model);

    // Toolbar
    ((RankingToolbar) rankingToolbar).refreshModel(model);
  }