Examples of UGateListener


Examples of org.ugate.UGateListener

  /**
   * Listens for any incoming {@linkplain UGateEvent}s and handles
   * {@linkplain ControlBar} related tasks
   */
  private void listenForAppEvents() {
    UGateKeeper.DEFAULT.addListener(new UGateListener() {
      @Override
      public void handle(final UGateEvent<?, ?> event) {
        if (event.getMessageString() != null && !event.getMessageString().isEmpty()) {
          setHelpText(event.getMessageString());
        }
View Full Code Here

Examples of org.ugate.UGateListener

  /**
   * Registers any {@linkplain UGateListener}s
   */
  protected final void registerListeners() {
    UGateKeeper.DEFAULT.addListener(new UGateListener() {
      @Override
      public void handle(final UGateEvent<?, ?> event) {
        final boolean isRemoteCommand = event.isFromRemote() && event.getCommand() != null;
        if (event.getType() == UGateEvent.Type.WIRELESS_REMOTE_NODE_COMMITTED) {
          // notify the user that the remote node has successfully been committed locally
View Full Code Here

Examples of org.ugate.UGateListener

    final JSONObjectConvertor cvt = new JSONObjectConvertor();
    jsonRemoteNode = new JSON();
    jsonRemoteNode.addConvertor(RemoteNode.class, cvt);
    jsonRemoteNodeReading = new JSON();
    jsonRemoteNodeReading.addConvertor(RemoteNodeReading.class, cvt);
    uiListener = new UGateListener() {
      @Override
      public void handle(final UGateEvent<?, ?> event) {
        if (members.size() <= 0) {
          return;
        }
View Full Code Here

Examples of org.ugate.UGateListener

   * @param emailIcon
   *            the {@linkplain StatusIcon} for email
   */
  private void listenForAppEvents(final StatusIcon emailIcon) {
    // update the status when email connections are made/lost
    UGateKeeper.DEFAULT.addListener(new UGateListener() {
      @Override
      public void handle(final UGateEvent<?, ?> event) {
        if (event.getType() == UGateEvent.Type.EMAIL_CONNECTING) {
          emailConnectBtn.setDisable(true);
          cb.setHelpText(RS.rbLabel(KEY.MAIL_CONNECTING));
View Full Code Here

Examples of org.ugate.UGateListener

                  }
                }
              });
          // when the primary stage is minimized to the system tray
          // show a notification for the event message
          UGateKeeper.DEFAULT.addListener(new UGateListener() {
            @Override
            public void handle(final UGateEvent<?, ?> event) {
              if (!SystemTray.this.stage.isShowing()) {
                final String msg = event.getMessageString();
                if (msg != null && !msg.isEmpty()) {
View Full Code Here

Examples of org.ugate.UGateListener

    final GridPane readingsGroup = GuiUtil.createBackgroundDisplay(PADDING_INSETS, CHILD_SPACING,
        orientation == Orientation.HORIZONTAL ? 10 : 1, true,
        0, 0, readDate, sonarReadingLabel, sonarReading, pirReadingLabel, pirReading,
        mwReadingLabel, mwReading, laserReadingLabel, laserReading, reportReadings);
    // show a visual indication that the settings need updated
    UGateKeeper.DEFAULT.addListener(new UGateListener() {
      @Override
      public void handle(final UGateEvent<?, ?> event) {
        if (event.getType() == UGateEvent.Type.WIRELESS_DATA_RX_SUCCESS) {
          final RemoteNode rn = (RemoteNode) event.getSource();
          if (event.getNewValue() instanceof RxTxRemoteNodeReadingDTO &&
View Full Code Here

Examples of org.ugate.UGateListener

   *            the {@linkplain StatusIcon} for wireless
   * @param webIcon
   *            the {@linkplain StatusIcon} for web
   */
  private void listenForAppEvents(final StatusIcon wirelessIcon, final StatusIcon webIcon) {
    UGateKeeper.DEFAULT.addListener(new UGateListener() {
      @Override
      public void handle(final UGateEvent<?, ?> event) {
        if (event.getType() == UGateEvent.Type.WIRELESS_HOST_CONNECTING) {
          wirelessBtn.setDisable(true);
          cb.setHelpText(RS.rbLabel(KEY.WIRELESS_CONNECTING));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.