MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / Label

Class Label

CodenameOne/src/com/codename1/ui/Label.java:67–1634  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65///
66/// @author Chen Fishbein
67public class Label extends Component implements IconHolder, TextHolder {
68
69 private static int defaultGap = 2;
70 private static boolean defaultTickerEnabled = true;
71 private boolean iconChangeListenerInstalled;
72 /// Fallback to the old default look and feel renderer for cases where compatibility is essential
73 private boolean legacyRenderer;
74 private String text = "";
75 private TextSelectionSupport textSelectionSupport;
76 private boolean textSelectionEnabled;
77 private Image icon;
78 private final ActionListener iconChangeListener = new ActionListener() {
79 @Override
80 public void actionPerformed(ActionEvent evt) {
81 if (isInitialized() && evt.getSource() == getIcon()) {
82 repaint();
83 }
84 }
85
86 };
87 private Image maskedIcon;
88 private Component iconStyleComponent;
89 private int valign = BOTTOM;
90 private int textPosition = RIGHT;
91 private int gap = defaultGap;
92 private int shiftText = 0;
93 private boolean tickerRunning = false;
94 private boolean tickerEnabled = defaultTickerEnabled;
95
96 private long tickerStartTime;
97
98 private long tickerDelay;
99
100 private boolean rightToLeft;
101
102 private boolean endsWith3Points = true;
103
104 private Object mask;
105
106 private String maskName;
107 private EventDispatcher textBindListeners = null;
108 private boolean shouldLocalize = true;
109 private boolean showEvenIfBlank = false;
110 private float shiftMillimeters = 0.25f;
111 private int stringWidthUnselected = -1;
112
113 private boolean autoSizeMode;
114 private float maxAutoSize = -1;
115 private float minAutoSize = -1;
116 private Font originalFont;
117 private int widthAtLastCheck = -1;
118 private char materialIcon;
119 private float materialIconSize = -1;
120 private Font font;
121 private char fontIcon;
122 private float fontIconSize = -1;
123 private String badgeText;
124 private Component badgeStyleComponent;

Callers 1

runTestMethod · 0.85

Calls

no outgoing calls

Tested by 1

runTestMethod · 0.68