Package net.sourceforge.sijaf.example.file

Examples of net.sourceforge.sijaf.example.file.SimpleFileModel


  private SimpleFileCtrl fileCtrl;

  public DefaultDesktopCtrl(DefaultDesktopApplication appl) {
    this.appl = appl;
    this.view = new DefaultDesktopView(appl, this);
    SimpleFileModel model = new SimpleFileModel();
    SimpleData data = new SimpleData();
    model.setData(data);
    this.fileCtrl = new SimpleFileCtrl(model, appl.getMainFrame(), this);
  }
View Full Code Here


    updateUIComponents();
    this.appl.show(this.view);
  }

  public void makeDirty() {
    SimpleFileModel model = this.fileCtrl.getModel();
    if (model != null) {
      model.setDirty(true);
    }
    updateUIComponents();
  }
View Full Code Here

    }
    updateUIComponents();
  }

  public void updateUIComponents() {
    SimpleFileModel model = this.fileCtrl.getModel();
    boolean hasActiveFile = false;
    boolean isFileDirty = false;

    File file = null;
    if (model == null) {
      hasActiveFile = false;
    } else {
      file = model.getDataFile();
      if (file == null) {
        hasActiveFile = false;
      } else {
        hasActiveFile = true;
      }
      if (model.isDirty()) {
        isFileDirty = true;
      } else {
        isFileDirty = false;
      }
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.sijaf.example.file.SimpleFileModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.