List of usage examples for org.eclipse.jface.util Policy getAnimatorFactory
@Deprecated public static AnimatorFactory getAnimatorFactory()
From source file:org.modelio.api.ui.ModelioDialog.java
License:Apache License
/** * Set an error message that will display in the message area on top of the * header of the dialog, with an error small icon.<br> * Removes the message if null is passed . * @param newErrorMessage The error message or null to remove the error message. *//* w ww .ja va 2 s. c o m*/ @objid("7c15376f-704b-11dd-933a-001ec947cd2a") protected void setErrorMessage(String newErrorMessage) { if ((this.errorMessage != null) ? this.errorMessage.equals(newErrorMessage) : newErrorMessage == null) return; this.errorMessage = newErrorMessage; if (this.errorMessage == null) { if (this.messageArea != null && !this.showingWarning) setMessageAreaVisible(false); if (this.showingError) this.showingError = false; if (this.message == null) this.message = ""; updateMessage(this.message); this.messageImageLabel.setImage(this.messageImage); setImageLabelVisible(this.messageImage != null); if (this.showingWarning) setWarningMessage(this.warningMessage); } else { if (!this.showingError) this.showingError = true; if (this.showingWarning) setWarningMessage(null); if (this.messageArea == null) { this.messageArea = new ImageAndMessageArea(this.titleArea, 64); this.messageArea.setBackground(this.messageLabel.getBackground()); this.animator = Policy.getAnimatorFactory().createAnimator(this.messageArea); } this.messageArea.setToolTipText(this.errorMessage); this.messageArea.setText(this.errorMessage); this.messageArea.setImage(JFaceResources.getImage("dialog_message_error_image")); setMessageAreaVisible(true); } int verticalSpacing = convertVerticalDLUsToPixels(1); int horizontalSpacing = convertHorizontalDLUsToPixels(4); setLayoutsForNormalMessage(verticalSpacing, horizontalSpacing); }
From source file:org.modelio.api.ui.ModelioDialog.java
License:Apache License
/** * Set a warning message that will display in the message area on top of the dialog, * with a warning small icon.<br>//from w w w. ja v a2 s . com * Removes the message if null is passed . * @param newMessage The warning message or null to remove the warning message. */ @objid("7c12d579-704b-11dd-933a-001ec947cd2a") protected void setWarningMessage(String newMessage) { // @SuppressWarnings("deprecation") added to if (this.warningMessage != null ? this.warningMessage.equals(newMessage) : newMessage == null) return; this.warningMessage = newMessage; if (this.warningMessage == null) { if (this.messageArea != null && !this.showingError) setMessageAreaVisible(false); if (this.showingWarning) this.showingWarning = false; } else { if (!this.showingWarning) this.showingWarning = true; this.warningMessage = newMessage; if (this.messageArea == null) { this.messageArea = new ImageAndMessageArea(this.titleArea, 64); this.messageArea.setBackground(this.messageLabel.getBackground()); this.animator = Policy.getAnimatorFactory().createAnimator(this.messageArea); } this.messageArea.setToolTipText(this.warningMessage); this.messageArea.setText(this.warningMessage); this.messageArea.setImage(JFaceResources.getImage("dialog_messasge_warning_image")); setMessageAreaVisible(true); } int verticalSpacing = convertVerticalDLUsToPixels(1); int horizontalSpacing = convertHorizontalDLUsToPixels(4); setLayoutsForNormalMessage(verticalSpacing, horizontalSpacing); }
From source file:org.modelio.core.ui.dialog.ModelioDialog.java
License:Open Source License
/** * Set an error message that will display in the message area on top of the * header of the dialog, with an error small icon.<br> * Removes the message if null is passed . * @param newErrorMessage The error message or null to remove the error message. *//*from w ww.j av a 2 s . c o m*/ @objid("00493ef0-4a05-1fe0-bf4c-001ec947cd2a") protected void setErrorMessage(String newErrorMessage) { if ((this.errorMessage != null) ? this.errorMessage.equals(newErrorMessage) : newErrorMessage == null) return; this.errorMessage = newErrorMessage; if (this.errorMessage == null) { if (this.messageArea != null && !this.showingWarning) setMessageAreaVisible(false); if (this.showingError) this.showingError = false; if (this.message == null) this.message = ""; updateMessage(this.message); this.messageImageLabel.setImage(this.messageImage); setImageLabelVisible(this.messageImage != null); if (this.showingWarning) setWarningMessage(this.warningMessage); } else { if (!this.showingError) this.showingError = true; if (this.showingWarning) setWarningMessage(null); if (this.messageArea == null) { this.messageArea = new ImageAndMessageArea(this.titleArea, 64); this.messageArea.setBackground(this.messageLabel.getBackground()); this.animator = Policy.getAnimatorFactory().createAnimator(this.messageArea); } this.messageArea.setToolTipText(this.errorMessage); this.messageArea.setText(this.errorMessage); this.messageArea.setImage(JFaceResources.getImage("dialog_message_error_image")); setMessageAreaVisible(true); } int verticalSpacing = convertVerticalDLUsToPixels(1); int horizontalSpacing = convertHorizontalDLUsToPixels(4); setLayoutsForNormalMessage(verticalSpacing, horizontalSpacing); }
From source file:org.modelio.core.ui.dialog.ModelioDialog.java
License:Open Source License
/** * Set a warning message that will display in the message area on top of the * dialog, with a warning small icon.<br> * Removes the message if null is passed . * @param newMessage The warning message or null to remove the warning message. *//*from w ww . j a va 2s .co m*/ @objid("0049ec10-4a05-1fe0-bf4c-001ec947cd2a") protected void setWarningMessage(String newMessage) { // @SuppressWarnings("deprecation") added to if (this.warningMessage != null ? this.warningMessage.equals(newMessage) : newMessage == null) return; this.warningMessage = newMessage; if (this.warningMessage == null) { if (this.messageArea != null && !this.showingError) setMessageAreaVisible(false); if (this.showingWarning) this.showingWarning = false; } else { if (!this.showingWarning) this.showingWarning = true; this.warningMessage = newMessage; if (this.messageArea == null) { this.messageArea = new ImageAndMessageArea(this.titleArea, 64); this.messageArea.setBackground(this.messageLabel.getBackground()); this.animator = Policy.getAnimatorFactory().createAnimator(this.messageArea); } this.messageArea.setToolTipText(this.warningMessage); this.messageArea.setText(this.warningMessage); this.messageArea.setImage(JFaceResources.getImage("dialog_messasge_warning_image")); setMessageAreaVisible(true); } int verticalSpacing = convertVerticalDLUsToPixels(1); int horizontalSpacing = convertHorizontalDLUsToPixels(4); setLayoutsForNormalMessage(verticalSpacing, horizontalSpacing); }