Package org.eclipse.e4.xwt

Examples of org.eclipse.e4.xwt.XWTException


            IUserDataConstants.XWT_PROPERTY_ITEM_IMAGE_KEY)) {
          return null;
        }
      }
    } catch (Exception e) {
      throw new XWTException(e);
    }
    if (value != null) {
      return value.toString();
    }
    return "";
View Full Code Here


        else{
          return null;
        }
      }
    } catch (Exception e) {
      throw new XWTException(e);
    }
    if (value instanceof IObservableValue) {
      IObservableValue observableValue = (IObservableValue) value;
      value = observableValue.getValue();
    }
    if (value instanceof Image) {
      return (Image) value;
    } else if (value != null) {
      value = ObjectUtil.resolveValue(value, Image.class, value);
      if (value == null) {
        return null;
      }
      if (value instanceof Image) {
        return (Image) value;
      }
      throw new XWTException("Converter from " + value.getClass()
          + " to Image is missing.");
    }
    return null;
  }
View Full Code Here

    if (this.tryParse(s, out)) {
      return out.value;
    }
    switch (this.error) {
    case Format:
      throw new XWTException("Format_InvalidString");

    case Overflow:
      throw new XWTException("Overflow_TimeSpanTooLong");

    case OverflowHoursMinutesSeconds:
      throw new XWTException("Overflow_TimeSpanElementTooLarge");

    case ArgumentNull:
      throw new XWTException("s");
    }
    return (long) 0;
  }
View Full Code Here

      String propertyName = condition.getProperty();
      String sourceName = condition.getSourceName();

      Object source = getElementByName(target, sourceName);
      if (source == null) {
        throw new XWTException("No element is found with the name = "
            + sourceName);
      }
      IObservable observableValue = ScopeManager.observeValue(source,
          source, propertyName, UpdateSourceTrigger.PropertyChanged);
      observableValue.addChangeListener(changeListener);
View Full Code Here

  @Override
  protected void doStart(Timeline timeline, Object target) {
    Object widget = UserData.getWidget(target);
    if (!(widget instanceof Control)) {
      throw new XWTException(
          "The target of the animation is not a Control.");
    }
    timeline.addPropertyToInterpolate(getTargetProperty(), getFrom(), getTo());
  }
View Full Code Here

  public void prepare(Object target) {
    if (property != null) {
      final Object source = getElementByName(target, sourceName);
      if (source == null) {
        throw new XWTException("No element is found with the name = " + sourceName);
      }
      IObservable observableValue = ScopeManager.observeValue(source, source, property, UpdateSourceTrigger.PropertyChanged);
      observableValue.addChangeListener(new AbstractChangeListener(target) {
        public void handleChange(ChangeEvent event) {
          Class<?> valueType = JFaceXWTDataBinding.getValueType(source.getClass(), property);
View Full Code Here

      return true;
    }
    else if ("false".equalsIgnoreCase(str)) {
      return false;
    }
    throw new XWTException(str + " is not a boolean");
  }
View Full Code Here

          current = currentParentLoader.loadData;
          currentParentLoader = currentParentLoader.parentLoader;
        }
      }
      if (method == null) {
        LoggerManager.log(new XWTException("Event handler \"" + handler
            + "\" is not found."));
      }
    }
View Full Code Here

          } else if (loadedMethod.getParameterTypes().length == 2) {
            loadedMethod.invoke(loadedObject, new Object[] {
                loadedObject, event });
          }
        } catch (IllegalArgumentException e1) {
          throw new XWTException("");
        } catch (IllegalAccessException e1) {
          throw new XWTException("");
        } catch (InvocationTargetException e1) {
          throw new XWTException("");
        }         
        loadedObject = null;
        loadedMethod = null;
        hostCLRWidget = null;
      }
View Full Code Here

        }
        return data;
      }
      parent = (Widget) UserData.getParent(parent);
    }
    throw new XWTException("Key " + key + " is not found.");     
  }
View Full Code Here

TOP

Related Classes of org.eclipse.e4.xwt.XWTException

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.