Examples of WCVCam


Examples of webcam.WCVCam

    loadFileMenu(fileMenu);
    menuBar.add(fileMenu);

    //Cam Menu
    try{
      WCVCam cam;
      File camsList = new File(CAMLIST_FILE);
      camsList.getParentFile().mkdirs();
      camsList.createNewFile();
      Scanner scan = new Scanner(camsList);
      int i = 0; String camURL;
      JMenuItem item;
      while(scan.hasNextLine()) {
        item = new JMenuItem();
        item.setOpaque(true);
        String camTitle[] = scan.nextLine().split(", ");
        if(camTitle[0].contains("****")) {
          //"****" Marks the most recently viewed cam
          camTitle[0] = camTitle[0].substring(5);
          camNum = i;
        }
        camURL = scan.nextLine();
        if(camTitle.length == 1 || camTitle[1] == "") {
          cam = new WCVCam(camTitle[0], "", camURL);
          cam.setImageViewerMode(WCVPreferences.getViewerMode());
          cams.add(cam);
          item.setText(camTitle[0]);
        }
        else {
          cam = new WCVCam(camTitle[0], camTitle[1], camURL);
          cam.setImageViewerMode(WCVPreferences.getViewerMode());
          cams.add(cam);
          item.setText(camTitle[0] + ", " + camTitle[1]);
        }
        item.setFont(itemFont);
        item.addActionListener(new CamSwitchListener(i));
View Full Code Here

Examples of webcam.WCVCam

        String inLoc = (String)JOptionPane.showInputDialog(
            this,
            "Enter a Country or Region for this Webcam",
            "Add New Webcam",
            JOptionPane.PLAIN_MESSAGE);
        WCVCam cam = new WCVCam(inName, inLoc, inURL);
        cams.add(cam);
        writeCamListFile();
        //Note writeCamList sorts the cams by region
        int camInd = cams.indexOf(cam);
        loadMenu();
View Full Code Here

Examples of webcam.WCVCam

  public WCVCamPanel() {
    this.lineBorder = false;
    this.refreshThread = null;
    this.refreshFailed = true;
    this.cam = new WCVCam("Webcam Viewer", "", "-----");
    this.camLabel = "Webcam Viewer";
  }
View Full Code Here

Examples of webcam.WCVCam

  private WCVCam cam1, cam2;
  private boolean testImgUp;
  @Before
  public void setUp() throws Exception {
    this.testImgUp = true;
    this.cam1 = new WCVCam("CAM1", "LOC1", TEST_IMG);
    this.cam2 = new WCVCam("CAM2", "LOC2", "http://anonexistantsite/andnonexistantpng.png");
    WCVCam.setPhotoDir(".");
    cam1.setScaleDimension(new Dimension(WCViewer.WIDTH, WCViewer.HEIGHT));
    cam2.setScaleDimension(new Dimension(WCViewer.WIDTH, WCViewer.HEIGHT));
    //Check whether test image is reachable for testing
    try {
View Full Code Here

Examples of webcam.WCVCam

  }

  @Test
  public void testCompareTo() {
    assert(cam1.compareTo(cam2) < 0);
    WCVCam cam3 = new WCVCam("CAM1", "LOC1", TEST_IMG);
    assert(cam1.compareTo(cam3) == 0);
  }
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.