MakeScreen Method.
12576
public ScreenParent makeScreen(ScreenLoc itsLocation, ComponentParent parentScreen, int iDocMode, Map<String,Object> properties)
    {
        ScreenParent screen = null;
        if ((iDocMode & ScreenConstants.MAINT_MODE) == ScreenConstants.MAINT_MODE)
        {   // This is a little weird... can't directly change this table, must edit AnnivMaster
            Record recAnnivMaster = ((ReferenceField)this.getField(Anniversary.ANNIV_MASTER_ID)).getReferenceRecord(this.getRecordOwner());
            recAnnivMaster.setOpenMode(recAnnivMaster.getOpenMode() & ~DBConstants.OPEN_READ_ONLY);
            if ((this.getEditMode() == DBConstants.EDIT_CURRENT)
                || (this.getEditMode() == DBConstants.EDIT_IN_PROGRESS))
                    recAnnivMaster = ((ReferenceField)this.getField(Anniversary.ANNIV_MASTER_ID)).getReference();
            // Disconnect recAnnivMaster and free this
            ((ReferenceField)this.getField(Anniversary.ANNIV_MASTER_ID)).setReferenceRecord(null);
            this.free();
            return recAnnivMaster.makeScreen(itsLocation, parentScreen, iDocMode, properties);
        }
        else
            screen = super.makeScreen(itsLocation, parentScreen, iDocMode, properties);
        return screen;
    }
499903
def clone(self, screen, scene):
        
        # Only clone the object if the function is safe to do so.
        if self._on_close is None or isfunction(self._on_close):
            scene.add_effect(PopUpDialog(screen, self._text, self._buttons, self._on_close))
140421
public ScreenComponent setupIconView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, boolean bIncludeBlankOption)
    {
        ScreenComponent screenField = null;
        Record record = this.makeReferenceRecord();
        //  Set up the listener to read the current record on a valid main record
        
        ImageField fldDisplayFieldDesc = this.getIconField(record);
        if (fldDisplayFieldDesc.getListener(BlankButtonHandler.class) == null)
            fldDisplayFieldDesc.addListener(new BlankButtonHandler(null));
        if (fldDisplayFieldDesc != null)
        {    // The next two lines are so in GridScreen(s), the converter leads to this field, while it displays the fielddesc.
            FieldConverter fldDescConverter = new FieldDescConverter(fldDisplayFieldDesc, (Converter)converter);
            Map<String,Object> properties = new HashMap<String,Object>();
            properties.put(ScreenModel.IMAGE, ScreenModel.NONE);
            properties.put(ScreenModel.NEVER_DISABLE, Constants.TRUE);
            screenField = createScreenComponent(ScreenModel.BUTTON_BOX, itsLocation, targetScreen, fldDescConverter, iDisplayFieldDesc, properties);
            //?{
            //?    public void setEnabled(boolean bEnabled)
            //?    {
            //?        super.setEnabled(true); // Never disable
            //?    }
            //?};
            String strDisplay = converter.getFieldDesc();
            if (!(targetScreen instanceof GridScreenParent))
                if ((strDisplay != null) && (strDisplay.length() > 0))
            { // Since display string does not come with buttons
                ScreenLoc descLocation = targetScreen.getNextLocation(ScreenConstants.FIELD_DESC, ScreenConstants.DONT_SET_ANCHOR);
                properties = new HashMap<String,Object>();
                properties.put(ScreenModel.DISPLAY_STRING, strDisplay);
                createScreenComponent(ScreenModel.STATIC_STRING, descLocation, targetScreen, converter, iDisplayFieldDesc, properties);
            }
        }

        if (((targetScreen instanceof GridScreenParent)) || (iDisplayFieldDesc == ScreenConstants.DONT_DISPLAY_FIELD_DESC))
        { // If there is no popupbox to display the icon, I must explicitly read it.
            this.addListener(new ReadSecondaryHandler(fldDisplayFieldDesc.getRecord()));
        }
        return screenField;
    }
1160826
def cmd_screen(action, action_space, ability_id, queued, screen):
  """"""
  action_cmd = spatial(action, action_space).unit_command
  action_cmd.ability_id = ability_id
  action_cmd.queue_command = queued
  screen.assign_to(action_cmd.target_screen_coord)
634048
public static android.view.View createView(Context context, Object screen) {
    return createView(context, screen.getClass());
  }
130889
private static void createAndShowGUI() {

    // Create and set up the window.
    JFrame frame = new JFrame("PCB Annotated Image Explorer");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    // Add content to the window.
    frame.add(new PCBAnnotatedImageViewer());

    Runtime.getRuntime().addShutdownHook(new Thread() {

      @Override
      public void run() {

        System.out.println("****************************");
        PCBDAO.release(); // release data resources

      }
    });
    // Display the window.
    frame.pack();
    frame.setVisible(true);
  }
1323686
public static void showOnScreen(final int screen, final JFrame frame)
	{
		if (isScreenAvailableToShow(screen))
		{
			final GraphicsDevice[] graphicsDevices = getAvailableScreens();
			graphicsDevices[screen].setFullScreenWindow(frame);
		}
	}
578752
def build_screen_image(edit_buffer)
      working_region = edit_buffer[left_margin..right_margin]

      if (mask = @options[:secret_mask])
        mask[0] * working_region.length
      else
        working_region
      end.ljust(active_width)
    end
715082
@Override
    public Screen createScreen(Config config)
    {
        Check.notNull(config);

        return new ScreenHeadless(config);
    }
341195
def fullscreen(self):
        """"""
        self.stream.write(self.enter_fullscreen)
        try:
            yield
        finally:
            self.stream.write(self.exit_fullscreen)
299449
def ScreenGenerator(nfft, r0, nx, ny):
    """"""
    while 1:
        layers = GenerateTwoScreens(nfft, r0)
        for iLayer in range(2):
            for iy in range(int(nfft/ny)):
                for ix in range(int(nfft/nx)):
                    yield layers[iLayer][iy*ny:iy*ny+ny, ix*nx:ix*nx+nx]
399110
def _screen_buffer(self):
        """"""
        # get the address of the screen
        address = _LIB.Screen(self._env)
        # create a buffer from the contents of the address location
        buffer_ = ctypes.cast(address, ctypes.POINTER(SCREEN_TENSOR)).contents
        # create a NumPy array from the buffer
        screen = np.frombuffer(buffer_, dtype='uint8')
        # reshape the screen from a column vector to a tensor
        screen = screen.reshape(SCREEN_SHAPE_32_BIT)
        # flip the bytes if the machine is little-endian (which it likely is)
        if sys.byteorder == 'little':
            # invert the little-endian BGRx channels to big-endian xRGB
            screen = screen[:, :, ::-1]
        # remove the 0th axis (padding from storing colors in 32 bit)
        return screen[:, :, 1:]
959725
def imageInScreen(screen, image):
        

        # To make sure image smaller than screen.
        size_x1, size_y1 = screen.size
        size_x2, size_y2 = image.size
        if size_x1 <= size_x2 or size_y1 <= size_y2:
            return 0

        # Load pixels.
        screenPixels = screen.load()
        imagePixels = image.load()

        # Loop over all pixels, if pixel image[0,0] same as pixel screen[x,y] do crop and compare
        for x in range(size_x1 - size_x2):
            for y in range(size_y1 - size_y2):
                if imagePixels[0, 0] == screenPixels[x, y]:
                    croppedScreen = screen.crop((x, y, x + size_x2, y + size_y2))
                    size_x3, size_y3 = croppedScreen.size
                    croppedPixels = croppedScreen.load()
                    for x in range(size_x3):
                        for y in range(size_y3):
                            if imagePixels[x, y] == croppedPixels[x, y]:
                                return True
226650
void putScreen(Context context) {
    Map<String, Object> screen = createMap();
    WindowManager manager = getSystemService(context, Context.WINDOW_SERVICE);
    Display display = manager.getDefaultDisplay();
    DisplayMetrics displayMetrics = new DisplayMetrics();
    display.getMetrics(displayMetrics);
    screen.put(SCREEN_DENSITY_KEY, displayMetrics.density);
    screen.put(SCREEN_HEIGHT_KEY, displayMetrics.heightPixels);
    screen.put(SCREEN_WIDTH_KEY, displayMetrics.widthPixels);
    put(SCREEN_KEY, screen);
  }
656292
def _screen(self, s, newline=False):
        """"""
        if self.verbose:
            if newline:
                print(s)
            else:
                print(s, end=' ')
391522
def _redraw_screen(self, stdscr):
        """"""
        with self._lock:
            stdscr.clear()
            stdscr.addstr(
                0, 0, "workflows service monitor -- quit with Ctrl+C", curses.A_BOLD
            )
            stdscr.refresh()
            self.message_box = self._boxwin(
                5, curses.COLS, 2, 0, title="last seen message", color_pair=1
            )
            self.message_box.scrollok(True)
            self.cards = []
1281948
def create_render_window(actors, callbacks, **kwargs):
    
    # Get keyword arguments
    figure_size = kwargs.get('figure_size', (800, 600))
    camera_position = kwargs.get('camera_position', (0, 0, 100))

    # Find camera focal point
    center_points = []
    for actor in actors:
        center_points.append(actor.GetCenter())
    camera_focal_point = linalg.vector_mean(*center_points)

    # Create camera
    camera = vtk.vtkCamera()
    camera.SetPosition(*camera_position)
    camera.SetFocalPoint(*camera_focal_point)

    # Create renderer
    renderer = vtk.vtkRenderer()
    renderer.SetActiveCamera(camera)
    renderer.SetBackground(1.0, 1.0, 1.0)

    # Add actors to the scene
    for actor in actors:
        renderer.AddActor(actor)

    # Render window
    render_window = vtk.vtkRenderWindow()
    render_window.AddRenderer(renderer)
    render_window.SetSize(*figure_size)

    # Render window interactor
    window_interactor = vtk.vtkRenderWindowInteractor()
    window_interactor.SetRenderWindow(render_window)

    # Add event observers
    for cb in callbacks:
        window_interactor.AddObserver(cb, callbacks[cb][0], callbacks[cb][1])  # cb name, cb function ref, cb priority

    # Render actors
    render_window.Render()

    # Set window name after render() is called
    render_window.SetWindowName("geomdl")

    # Use trackball camera
    interactor_style = vtk.vtkInteractorStyleTrackballCamera()
    window_interactor.SetInteractorStyle(interactor_style)

    # Start interactor
    window_interactor.Start()

    # Return window interactor instance
    return window_interactor