Package org.jamesii.gui.application

Examples of org.jamesii.gui.application.IWindow


    // System.out.println("About to observe something!" +entity);

    if (grid == null) {
      System.out.println("Creating visualization");
      IWindow window =
          new AbstractWindow("CA Visualization", null, Contribution.EDITOR) {

            @Override
            protected JComponent createContent() {
              grid = new Grid2D(FFStateModelObs.this);
              addGridCellListener(grid);
              return grid;
            }

            @Override
            protected IAction[] generateActions() {
              return null;
            }

          };

      JFrame f = new JFrame();
      f.add(window.getContent());
      f.pack();
      f.show();
      System.out.println("Created visualization");
      // WindowManagerManager.getWindowManager().addWindow(window);
    }
View Full Code Here


    }

    this.windowManager = windowManager;
    windowManager.addWindowListener(this);

    IWindow window = windowManager.getActiveWindow();
    setEnabled(window != null && window.isSaveable());
  }
View Full Code Here

    setEnabled(window != null && window.isSaveable());
  }

  @Override
  public void execute() {
    IWindow window = windowManager.getActiveWindow();
    if (window != null && window.isSaveable()) {
      try {
        window.saveAs();
      } catch (Exception e) {
        SimSystem.report(e);
      }
    }
  }
View Full Code Here

  public void windowClosed(IWindow window) {
  }

  @Override
  public void windowDeactivated(IWindow window) {
    IWindow w = windowManager.getActiveWindow();
    setEnabled(w != null && w.isSaveable());
  }
View Full Code Here

    model = (ICARulesModel) entity;

    // System.out.println("About to observe something!");

    if (grid == null) {
      IWindow window =
          new AbstractWindow("CA Visualization", null, Contribution.EDITOR) {

            @Override
            protected JComponent createContent() {
              grid = new Grid2D(CAStateModelObs.this);
View Full Code Here

    model = (ICARulesModel) entity;

    // grid has not been used so far, thus initialize the window, ...
    if (grid == null) {
      IWindow window =
          new AbstractWindow("CA Visualization", null, Contribution.EDITOR) {

            @Override
            protected JComponent createContent() {
              grid = new Grid2D(CA1DStateModelObs.this);
View Full Code Here

    winManager = windowManager;
  }

  @Override
  public void execute() {
    IWindow window = winManager.getActiveWindow();
    if (!(window instanceof ExperimentEditor)) {
      ApplicationLogger
          .log(
              Level.INFO,
              "Please select an experiment which shall be used for simulation space exploration.");
View Full Code Here

        pane.getUI().tabForCoordinate(pane, dragOrigin.x, dragOrigin.y);

    // if tab is valid initiate drag
    if (tabIndex >= 0 && tabIndex < pane.getTabCount()) {
      // get IWindow for tab
      final IWindow window = pane.getWindowAt(tabIndex);
      WindowTransferable data = new WindowTransferable(window);
      try {
        dge.startDrag(DragSource.DefaultMoveDrop, data, this);
        WindowManagerManager.getWindowManager().getMainWindow().getGlassPane()
            .setVisible(true);
View Full Code Here

    // (hack so far)
    if (!dsde.getDropSuccess()
        && !WindowManagerManager.getWindowManager().getMainWindow().getBounds()
            .contains(dsde.getLocation())) {
      try {
        IWindow window =
            (IWindow) dsde.getDragSourceContext().getTransferable()
                .getTransferData(WindowDataFlavor.getInstance());
        if (window != null) {
          pane.changeContribution(window,
              Contribution.DIALOG);
View Full Code Here

   * @param dtde
   *          the forwarded {@link DropTargetDropEvent}
   * @return true if the drop succeeded, false else
   */
  protected boolean completeDrop(DropTargetDropEvent dtde) {
    IWindow window;
    try {
      window =
          (IWindow) dtde.getTransferable().getTransferData(
              WindowDataFlavor.getInstance());
      if (window != null) {
View Full Code Here

TOP

Related Classes of org.jamesii.gui.application.IWindow

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.