Package cs213.photoAlbum.util

Examples of cs213.photoAlbum.util.Tag


   */
  public UserView(String title, String userID) throws IOException {

    super(title);
    inAlbumListMode = true;
    control = new DefaultControl(userID);
    setSize(800,600);
    setVisible(true);
    setLocationRelativeTo(null);
    setResizable(false);
    this.addWindowListener(new WindowAdapter(){
View Full Code Here


   * @param title title of the JFrame
   * @throws IOException
   */
  public LoginView(String title) throws IOException {
    super(title);
    control = new DefaultControl();
    usernameJL = new JLabel("Username: ");
    errorJL = new JLabel("");
    usernameTF = new JTextField(10);
    loginJB = new JButton("Login");
   
View Full Code Here

          e1.printStackTrace();
        }
      }
    });
   
    control = new DefaultControl();
    usernameJL = new JLabel("Username: ");
    usernameTF = new JTextField(10);
    nameJL = new JLabel("Name: ");
    nameTF = new JTextField(10);
    logoutJB = new JButton("Logout");
View Full Code Here

   * @param input String array read from the command line
   * @throws IOException
   *
   */
  private static void parseInput(String[] args) throws IOException{
    control = new DefaultControl();
    if (args[0].equalsIgnoreCase("listusers")){
      if (args.length != 1){
        System.out.println("listuser takes no other input");
      }
      listuser();
View Full Code Here

   * Logs in given the userID and starts interactive mode
   * @param userID user that is currently being logged in
   */
  private static void login(String userID){
    try{
      control = new DefaultControl(userID);
      curUserID = userID;
      interactivemode();
    } catch (IOException e){
      System.out.println(e.getMessage());
      //System.exit(0);
View Full Code Here

   * Updates the album labels if the current album selected changes.
   *
   */
  private void updateAlbumLabelPanel() {
    String albumname = (String) albumsJL.getSelectedValue();
    Album album = control.backend.getAlbum(albumname);
    albumNameJL.setText(albumname);

    if(album == null){
      albumNumPhotosJL.setText("");
      albumStartJL.setText("");
      albumEndJL.setText("");
    }else if(album.getPhotoList().size() == 0) {
      albumNumPhotosJL.setText("0");
      albumStartJL.setText("...");
      albumEndJL.setText("...");
    } else {
      albumNumPhotosJL.setText(album.getPhotoList().size() + "");
      albumStartJL.setText(album.start.toString());
      albumEndJL.setText(album.end.toString());
    }
  }
View Full Code Here

 
  public Backend backend;
  boolean userSet = false;
 
  public DefaultControl() throws IOException{
    backend = new Backend();
  }
View Full Code Here

  public DefaultControl() throws IOException{
    backend = new Backend();
  }
 
  public DefaultControl(String userID) throws IOException{
    backend = new Backend(userID);
    userSet = true;
  }
View Full Code Here

  /* (non-Javadoc)
   * @see cs213.photoAlbum.control.ControlInterface#addTag(java.lang.String, java.lang.String, java.lang.String)
   */
  @Override
  public boolean addTag(String filename, String tagType, String TagValue) {
    Photo p = backend.getPhoto(filename);
    if (p == null){
      System.out.println("The photo does not exist.");
      return false;
    }
    p.addTagToList(new Tag(tagType, TagValue));
    return true;
  }
View Full Code Here

  /* (non-Javadoc)
   * @see cs213.photoAlbum.control.ControlInterface#removeTag(java.lang.String, java.lang.String, java.lang.String)
   */
  @Override
  public boolean removeTag(String filename, String tagType, String TagValue) {
    Photo p = backend.getPhoto(filename);
    if (p == null){
      System.out.println("Photo does not exist");
    }
    p.deleteTagFromList(new Tag(tagType, TagValue));
    return false;
  }
View Full Code Here

TOP

Related Classes of cs213.photoAlbum.util.Tag

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.