private void setDefaults() { setBackgroundColor(Color.BLUE); setBorderBehavior(BorderBehavior.NONE); TextStyle titleStyle = TextStyle.sansSerif(); titleStyle.setFontSize(40); setTitleStyle(titleStyle); setCounterStyle(TextStyle.sansSerif()); setSubtitleStyle(TextStyle.sansSerif()); }
void renderSubtitle(Graphics2D g) { subtitleDuration--; subtitleStyle.renderString( subtitle, new Point(WIDTH / 2.0, 30), TextStyle.ReferencePointLocation.BOTTOM_CENTER, g, null); }
void renderTitle(Graphics2D g) { titleDuration--; titleStyle.renderString( title, new Point(WIDTH / 2.0, HEIGHT / 2.0), TextStyle.ReferencePointLocation.CENTER, g, null); }