Package net.sourceforge.aprog.context

Examples of net.sourceforge.aprog.context.Context


   * @return
   * <br>Not null
   * <br>New
   */
  public static final Context newContext() {
    final Context result = new Context();

    result.set(APPLICATION_NAME, AFConstants.APPLICATION_NAME);
    result.set(APPLICATION_VERSION, AFConstants.APPLICATION_VERSION);
    result.set(APPLICATION_COPYRIGHT, AFConstants.APPLICATION_COPYRIGHT);
    result.set(APPLICATION_ICON_PATH, AFConstants.APPLICATION_ICON_PATH);

    return result;
  }
View Full Code Here


 
  @Override
  public final void perform(final Object object) {
    ignore(object);
   
    final Context context = this.getContext();
    final String iconPath = context.get(APPLICATION_ICON_PATH);
   
    SwingTools.setImagesBase("");
   
    JOptionPane.showMessageDialog(
        (Component) context.get(MAIN_FRAME),
        context.get(APPLICATION_NAME) + "\n" +
            context.get(APPLICATION_VERSION) + "\n" +
            context.get(APPLICATION_COPYRIGHT),
        translate("About {0}", context.get(APPLICATION_NAME)),
        JOptionPane.INFORMATION_MESSAGE,
        iconPath == null ? null : SwingTools.getIcon(context.get(APPLICATION_ICON_PATH).toString()));
  }
View Full Code Here

   * @return
   * <br>Not null
   * <br>New
   */
  public static final Context newContext() {
    final Context result = new Context();

    result.set(APPLICATION_NAME, AFConstants.APPLICATION_NAME);
    result.set(APPLICATION_VERSION, AFConstants.APPLICATION_VERSION);
    result.set(APPLICATION_COPYRIGHT, AFConstants.APPLICATION_COPYRIGHT);
    result.set(APPLICATION_ICON_PATH, AFConstants.APPLICATION_ICON_PATH);

    return result;
  }
View Full Code Here

 
  @Override
  public final void perform(final Object object) {
    ignore(object);
   
    final Context context = this.getContext();
    final String iconPath = context.get(APPLICATION_ICON_PATH);
   
    SwingTools.setImagesBase("");
   
    JOptionPane.showMessageDialog(
        (Component) context.get(MAIN_FRAME),
        context.get(APPLICATION_NAME) + "\n" +
            context.get(APPLICATION_VERSION) + "\n" +
            context.get(APPLICATION_COPYRIGHT),
        translate("About {0}", context.get(APPLICATION_NAME)),
        JOptionPane.INFORMATION_MESSAGE,
        iconPath == null ? null : SwingTools.getIcon(context.get(APPLICATION_ICON_PATH).toString()));
  }
View Full Code Here

TOP

Related Classes of net.sourceforge.aprog.context.Context

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.