Package org.tinyuml.util

Examples of org.tinyuml.util.ApplicationResources


 
  /**
   * Tests the getString() method.
   */
  public void testGetString() {
    ApplicationResources resources = ApplicationResources.getInstance();
    assertNull(resources.getString("does.not.exist"));
    assertEquals("ABOUT", resources.getString("menuitem.about.command"));
  }
View Full Code Here


  /**
   * Tests the getChar() method.
   */
  public void testGetChar() {
    ApplicationResources resources = ApplicationResources.getInstance();
    assertEquals(0, resources.getChar("does.not.exist"));
    assertEquals('n', resources.getChar("menuitem.new.mnemonic"));
  }
View Full Code Here

 
  /**
   * Tests the getString() method.
   */
  public void testGetString() {
    ApplicationResources resources = ApplicationResources.getInstance();
    assertNull(resources.getString("does.not.exist"));
    assertEquals("ABOUT", resources.getString("menuitem.about.command"));
  }
View Full Code Here

  /**
   * Tests the getChar() method.
   */
  public void testGetChar() {
    ApplicationResources resources = ApplicationResources.getInstance();
    assertEquals(0, resources.getChar("does.not.exist"));
    assertEquals('n', resources.getChar("menuitem.new.mnemonic"));
  }
View Full Code Here

   * @return true if the file does not yet exist or if the user confirmed
   * overwriting it, false if the file should not be written
   */
  protected boolean canWrite(Component component, File file) {
    if (file.exists()) {
      ApplicationResources resources = ApplicationResources.getInstance();
      String message = resources.getString("dialog.replacefile.confirm.msg");
      message = MessageFormat.format(message, file.getName());
      String title = resources.getString("dialog.replacefile.confirm.title");
      return JOptionPane.showConfirmDialog(component, message, title,
        JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION;
    }
    return true;
  }
View Full Code Here

   * @return true if the file does not yet exist or if the user confirmed
   * overwriting it, false if the file should not be written
   */
  protected boolean canWrite(Component component, File file) {
    if (file.exists()) {
      ApplicationResources resources = ApplicationResources.getInstance();
      String message = resources.getString("dialog.replacefile.confirm.msg");
      message = MessageFormat.format(message, file.getName());
      String title = resources.getString("dialog.replacefile.confirm.title");
      return JOptionPane.showConfirmDialog(component, message, title,
        JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION;
    }
    return true;
  }
View Full Code Here

 
  /**
   * Tests the getString() method.
   */
  public void testGetString() {
    ApplicationResources resources = ApplicationResources.getInstance();
    assertNull(resources.getString("does.not.exist"));
    assertEquals("ABOUT", resources.getString("menuitem.about.command"));
  }
View Full Code Here

  /**
   * Tests the getChar() method.
   */
  public void testGetChar() {
    ApplicationResources resources = ApplicationResources.getInstance();
    assertEquals(0, resources.getChar("does.not.exist"));
    assertEquals('n', resources.getChar("menuitem.new.mnemonic"));
  }
View Full Code Here

   * @return true if the file does not yet exist or if the user confirmed
   * overwriting it, false if the file should not be written
   */
  protected boolean canWrite(Component component, File file) {
    if (file.exists()) {
      ApplicationResources resources = ApplicationResources.getInstance();
      String message = resources.getString("dialog.replacefile.confirm.msg");
      message = MessageFormat.format(message, file.getName());
      String title = resources.getString("dialog.replacefile.confirm.title");
      return JOptionPane.showConfirmDialog(component, message, title,
        JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION;
    }
    return true;
  }
View Full Code Here

   * @return true if the file does not yet exist or if the user confirmed
   * overwriting it, false if the file should not be written
   */
  protected boolean canWrite(Component component, File file) {
    if (file.exists()) {
      ApplicationResources resources = ApplicationResources.getInstance();
      String message = resources.getString("dialog.replacefile.confirm.msg");
      message = MessageFormat.format(message, file.getName());
      String title = resources.getString("dialog.replacefile.confirm.title");
      return JOptionPane.showConfirmDialog(component, message, title,
        JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION;
    }
    return true;
  }
View Full Code Here

TOP

Related Classes of org.tinyuml.util.ApplicationResources

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.