Last active
March 20, 2018 06:25
-
-
Save ggalmazor/1f28b3b74048160b395b86eaf8f5668b to your computer and use it in GitHub Desktop.
Indirection without abstraction - Snippet 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ExportPanelForm { | |
private static final String EXPORTING = "Exporting"; | |
private static final String DOT = "."; | |
private JLabel exportingLabel; | |
public void updateExportingLabel() { | |
String text = exportingLabel.getText(); | |
if (text.equals(EXPORTING + DOT + DOT + DOT + DOT + DOT + DOT + DOT + DOT + DOT + DOT)) { | |
text = EXPORTING + DOT; | |
} else { | |
text += DOT; | |
} | |
exportingLabel.setText(text); | |
} | |
public void showExporting() { | |
exportingLabel.setText(EXPORTING + DOT); | |
exportingLabel.setVisible(true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment