Package java.awt

Examples of java.awt.Frame$AccessibleAWTFrame


                                              DataBuffer.TYPE_BYTE, 64, 64, 3),
                              null, layout);

        ScrollingImagePanel panel = new ScrollingImagePanel(image, 120, 120);

        Frame window = new Frame("JAI RandomOpImage Test");
        window.add(panel);
        window.pack();
        window.show();
    }
View Full Code Here


  }
 
  public static String getAudioFile()
  {
    Frame parent = new Frame();
    FileDialog fd = new FileDialog(parent, "Please choose a file:",
        FileDialog.LOAD);
    fd.setVisible(true);
    String fullPath = fd.getDirectory() + fd.getFile();
    if (fullPath == null)
View Full Code Here

* memory leaks.
*/
public class VolumeTestPlayer extends VlcjTest {

    public static void main(String[] args) throws Exception {
        Frame f = new Frame("Test Player");
        f.setIconImage(new ImageIcon(VolumeTestPlayer.class.getResource("/icons/vlcj-logo.png")).getImage());
        f.setSize(800, 600);
        f.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }
        });
        f.setLayout(new BorderLayout());
        Canvas vs = new Canvas();
        f.add(vs, BorderLayout.CENTER);
        f.setVisible(true);

        MediaPlayerFactory factory = new MediaPlayerFactory();

        EmbeddedMediaPlayer mediaPlayer = factory.newEmbeddedMediaPlayer();
        mediaPlayer.setVideoSurface(factory.newVideoSurface(vs));

        List<File> files = scanMedia(new File("/movies"));

        Thread.sleep(3000);

        for(File file : files) {
            mediaPlayer.playMedia(file.getAbsolutePath());
            Thread.sleep(500);
            mediaPlayer.setChapter(4);
            Thread.sleep(2000);
        }

        mediaPlayer.stop();
        mediaPlayer.release();
        factory.release();

        f.setVisible(false);

        System.out.println("Finished");

        // Don't exit so a profiler can connect
    }
View Full Code Here

            }
        });
    }

    public YouTubePlayer() {
        mainFrame = new Frame("vlcj YouTube Test");
        mainFrame.setIconImage(new ImageIcon(getClass().getResource("/icons/vlcj-logo.png")).getImage());
        mainFrame.setSize(800, 600);
        mainFrame.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
View Full Code Here

            }
        });
    }

    public OverlayTest(String mrl) {
        Frame f = new Frame("Test Player");
        f.setIconImage(new ImageIcon(getClass().getResource("/icons/vlcj-logo.png")).getImage());
        f.setSize(800, 600);
        f.setBackground(Color.black);
        f.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }
        });

        f.setLayout(new BorderLayout());
        Canvas vs = new Canvas();
        f.add(vs, BorderLayout.CENTER);
        f.setVisible(true);

        MediaPlayerFactory factory = new MediaPlayerFactory();

        final EmbeddedMediaPlayer mediaPlayer = factory.newEmbeddedMediaPlayer();
        mediaPlayer.setVideoSurface(factory.newVideoSurface(vs));

        f.addKeyListener(new KeyAdapter() {
            @Override
            public void keyPressed(KeyEvent e) {
                switch(e.getKeyCode()) {
                    case KeyEvent.VK_F11:
                        mediaPlayer.enableOverlay(!mediaPlayer.overlayEnabled());
View Full Code Here

        JPanel contentPane = new JPanel();
        contentPane.setBackground(Color.black);
        contentPane.setLayout(new GridLayout(rows, cols, 16, 16));
        contentPane.setBorder(new EmptyBorder(16, 16, 16, 16));

        mainFrame = new Frame("VLCJ Test Multi Player");
        mainFrame.setIconImage(new ImageIcon(getClass().getResource("/icons/vlcj-logo.png")).getImage());
        mainFrame.setLayout(new BorderLayout());
        mainFrame.setBackground(Color.black);
        mainFrame.add(contentPane, BorderLayout.CENTER);
        mainFrame.setBounds(100, 100, 1600, 300);
View Full Code Here

        p.add(o3);
        p.add(o4);

        p.add(c); // <--- must be added LAST to appear underneath the other components

        f = new Frame("Heavyweight Overlay Test");
        f.setLayout(new BorderLayout());
        f.setSize(1000, 900);
        f.add(p, BorderLayout.CENTER);
        f.addWindowListener(new WindowAdapter() {
            @Override
View Full Code Here

    {
  return dim;
    }
    public static void main(String args[])
    {
  Frame f;
  BSXDisplay b;

  f = new Frame("BSXDisplay Test");
  b = new BSXDisplay();
  f.add(b);
  f.pack();
  f.setResizable(false);
  f.show();

  int[][] scene = new int[3][];
  scene[0] = new int[] { 0, 0,0, 255,0, 255,255, 0,255 };
  scene[1] = new int[] { 4, 127,127, 255,255, 0,255 };
  scene[2] = new int[] { 8, 120,120, 134,120, 134, 134, 120,134 };
View Full Code Here

  @RunsInCurrentThread
  private static void showOwnerIfPossible(Window owner) {
    if (!(owner instanceof Frame)) {
      return;
    }
    Frame dialogOwner = (Frame) owner;
    dialogOwner.setLocation(DEFAULT_WINDOW_LOCATION);
    FrameShowTask.packAndShow(dialogOwner);
  }
View Full Code Here

    }
  }

  @Test
  public void should_create_new_Robot_and_use_given_frame_as_target() {
    Frame target = frame().createNew();
    fixture = new FrameFixture(target);
    assertThat(fixture.robot()).isNotNull();
    assertThat(fixture.target()).isSameAs(target);
  }
View Full Code Here

TOP

Related Classes of java.awt.Frame$AccessibleAWTFrame

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.