Examples of Screen


Examples of game.gfx.Screen

          colors[index++] = rr << 16 | gg << 8 | bb;
        }
      }
    }

    screen = new Screen(WIDTH, HEIGHT, new SpriteSheet("/sprite_sheet.png"));
    input = new InputHandler(this);

    showGui(new GuiMainMenu(this, WIDTH, HEIGHT));
  }
View Full Code Here

Examples of gnu.x11.Screen

        atomsWmSelection = new Atom[display.screens.length];
        Window wmSelectionWin = new Window(rootWin, 0,0, 1, 1, 0, new Window.Attributes());

  for (int i = 0; i< display.screens.length; i++) {
      Screen screen = display.screens[i];
      gnu.x11.Enum scrdepths = screen.depths();
      while (scrdepths.more()) {
          Depth depth = (Depth) scrdepths.next();
          screenDepth.put(depth.depth(), depth);
   
    gnu.x11.Enum enm = depth.visuals();       
View Full Code Here

Examples of javafx.stage.Screen

    final Image resImage = RS.img(RS.IMG_SKIN_RESTORE);
    maxBtn.setOnMouseClicked(new EventHandler<MouseEvent>() {
      @Override
      public void handle(MouseEvent event) {
                final double stageY = Utils.isMac() ? stage.getY() - 22 : stage.getY(); // TODO Workaround for RT-13980
                final Screen screen = Screen.getScreensForRectangle(stage.getX(), stageY, 1, 1).get(0);
                Rectangle2D bounds = screen.getVisualBounds();
                if (bounds.getMinX() == stage.getX() && bounds.getMinY() == stageY &&
                        bounds.getWidth() == stage.getWidth() && bounds.getHeight() == stage.getHeight()) {
                    if (backupWindowBounds != null) {
                        stage.setX(backupWindowBounds.getMinX());
                        stage.setY(backupWindowBounds.getMinY());
                        stage.setWidth(backupWindowBounds.getWidth());
                        stage.setHeight(backupWindowBounds.getHeight());
                        maxBtn.setImage(maxImage);
                    }
                } else {
                    backupWindowBounds = new Rectangle2D(stage.getX(), stage.getY(), stage.getWidth(), stage.getHeight());
                    final double newStageY = Utils.isMac() ? screen.getVisualBounds().getMinY() + 22 : screen.getVisualBounds().getMinY(); // TODO Workaround for RT-13980
                    stage.setX(screen.getVisualBounds().getMinX());
                    stage.setY(newStageY);
                    stage.setWidth(screen.getVisualBounds().getWidth());
                    stage.setHeight(screen.getVisualBounds().getHeight());
                    maxBtn.setImage(resImage);
                }
      }
    });
    final ImageView closeBtn = newTitleBarButton(RS.IMG_SKIN_CLOSE, 0.7, 0);
View Full Code Here

Examples of javafx.stage.Screen

              }
          });
          setOnMouseDragged(new EventHandler<MouseEvent>() {
              @Override public void handle(MouseEvent e) {
                  final double stageY = Utils.isMac() ? stage.getY() + 22 : stage.getY(); // TODO Workaround for RT-13980
                  final Screen screen = Screen.getScreensForRectangle(stage.getX(), stageY, 1, 1).get(0);
                  Rectangle2D visualBounds = screen.getVisualBounds();
                  if (Utils.isMac()) visualBounds = new Rectangle2D(visualBounds.getMinX(), visualBounds.getMinY() + 22,
                          visualBounds.getWidth(), visualBounds.getHeight()); // TODO Workaround for RT-13980
                  double maxX = Math.min(visualBounds.getMaxX(), e.getScreenX() + dragOffsetX);
                  double maxY = Math.min(visualBounds.getMaxY(), e.getScreenY() - dragOffsetY);
                  stage.setWidth(Math.max(stageMinimumWidth, maxX - stage.getX()));
View Full Code Here

Examples of javafx.stage.Screen

  /**
   * Positions the notification window
   */
  private void positionNotification() {
    final Screen screen = Screen.getPrimary();
    final Rectangle2D bounds = screen.getVisualBounds();
    notifyPopup.setX(bounds.getMaxX() - NOTIFY_WINDOW_WIDTH - 10d);
    notifyPopup.setY(bounds.getMaxY() - NOTIFY_WINDOW_HEIGHT - 10d);
  }
View Full Code Here

Examples of javafx.stage.Screen

    }
    log.debug("Minimizing application to system tray");
    if (dummyPopup == null) {
      // javafx.stage.Popup does not work
      dummyPopup = new Stage();
      final Screen screen = Screen.getPrimary();
      final Rectangle2D bounds = screen.getVisualBounds();
      dummyPopup.initModality(Modality.NONE);
      dummyPopup.initStyle(StageStyle.UTILITY);
      dummyPopup.setOpacity(0d);
      final Group root = new Group();
      root.getChildren().add(new Text("Close"));
View Full Code Here

Examples of javafx.stage.Screen

                private double restoreY;
                private double restoreW;
                private double restoreH;

                @Override public void handle(Event event) {
                    Screen screen = Screen.getPrimary(); // todo something more sensible
                    double minX = screen.getVisualBounds().getMinX();
                    double minY = screen.getVisualBounds().getMinY();
                    double maxW = screen.getVisualBounds().getWidth();
                    double maxH = screen.getVisualBounds().getHeight();

                    if (restoreW == 0 || getX() != minX || getY() != minY || getWidth() != maxW || getHeight() != maxH) {
                        restoreX = getX();
                        restoreY = getY();
                        restoreW = getWidth();
View Full Code Here

Examples of net.hearthstats.game.Screen

        throw new IllegalStateException("Unable to identify screen because previous screen "
            + previousScreen + " has no nextScreens parameter");
      }
    }

    Screen match = null;

    // Try to perform and exact match on the screen we were last on -- it's the
    // most likely one to match, of course!
    if (previousScreen != null) {
      if (checkForExactMatch(image, previousScreen)) {
        // This screen matches
        log.trace("Exact match on previous screen {}", previousScreen);
        match = previousScreen;
      }
    }

    // Try to find an exact match for the screens, based on the primary pixels
    // only
    if (match == null) {
      for (Screen screen : possibleScreens) {
        if (checkForExactMatch(image, screen)) {
          // This screen matches
          if (log.isDebugEnabled()) {
            if (match == null) {
              log.trace("Exact match on new screen {}", screen);
            } else {
              log.warn(
                  "More that one screen matched! Matched screen {}, but have already matched {}",
                  screen, match);
            }
          }

          match = screen;

          // If not running in debug mode, we can skip the rest of the loop for
          // efficiency
          if (!log.isDebugEnabled())
            break;
        }
      }
    }

    if (match == null) {
      // A check of the primary pixels did not find an exact match, so try for a
      // partial match
      log.debug("Did not find exact screen match, attempting partial match");

      Map<Screen, PartialResult> screenMatchesMap = new HashMap<>();
      int maxMatchedCount = 0;
      int maxUnmatchedCount = 0;
      Screen bestMatch = null;

      EnumSet<Screen> possibleScreensIncludingPrevious = EnumSet.copyOf(possibleScreens);
      if (previousScreen != null) {
        possibleScreensIncludingPrevious.add(previousScreen);
      }
View Full Code Here

Examples of net.rim.device.api.ui.Screen

    }
    contextMenu.addItem(deleteItem);
  }

  void pushScreen(Screen s) {
    Screen screen = getScreen();
    UiApplication app = (UiApplication) screen.getApplication();
    app.pushScreen(s);
  }
View Full Code Here

Examples of net.rim.device.api.ui.Screen

    public WidgetFieldManager( long style ) {
        super( style );
    }

    private BrowserFieldScreen getBrowserFieldScreen() {
        Screen bfScreen = getScreen();

        // Get the screen object.
        if( bfScreen instanceof BrowserFieldScreen ) {
            return (BrowserFieldScreen) bfScreen;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.