Пример #1
0
  @Override
  public BufferedImage draw() {
    /* if the Image is not created, instanciate it */
    /* create a proxy image */

    // créer l'instance BMP_Factory
    _concrete = BMP_Factory.getInstance().build(_file);

    if (_concrete != null) return _concrete.draw();

    /* if the Image could not be created for some reason, return null */
    return null;
  }
Пример #2
0
 @Override
 public int getWidth() {
   /* if the Image is not created, send false information */
   if (_concrete == null) return 100;
   else return _concrete.getWidth();
 }