Class MessageDisplayComponentSupport
java.lang.Object
com.inductiveautomation.ignition.designer.mvvm.messagedisplay.MessageDisplayComponentSupport
A utility class that provides support for painting text on a
In the component that you want to paint text on, add the following code to the paintComponent method:
JComponent.In the component that you want to paint text on, add the following code to the paintComponent method:
private final MessageDisplayComponentSupport support = new MessageDisplayComponentSupport(this);
@Override
protected void paintComponent(Graphics g) {
super.paintComponent(g);
support.paintTextOverlay(g);
}
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum -
Constructor Summary
ConstructorsConstructorDescriptionMessageDisplayComponentSupport(JComponent component) MessageDisplayComponentSupport(JComponent component, MessageDisplayComponentSupport.VerticalTextAlignment alignment) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidsetInfoText(String text) voidsetPromptText(String text) voidsetWarnText(String text)
-
Constructor Details
-
MessageDisplayComponentSupport
-
MessageDisplayComponentSupport
public MessageDisplayComponentSupport(JComponent component, MessageDisplayComponentSupport.VerticalTextAlignment alignment)
-
-
Method Details
-
setPromptText
-
setInfoText
-
setWarnText
-
clearAlert
public void clearAlert() -
paintTextOverlay
-