private String calculateText(final Object component) { // prep the text String t = getText(); //make components take priority if(text == null || text.trim().equals("")) { if(t != null && !t.trim().equals("")) { return t; } if(component instanceof JTextComponent) { t = ((JTextComponent)component).getText(); } if(component instanceof JLabel) { t = ((JLabel)component).getText(); } if(component instanceof AbstractButton) { t = ((AbstractButton)component).getText(); } return t; }
private String calculateText(final Object component) { // prep the text String t = getText(); //make components take priority if(text == null || text.trim().equals("")) { if(t != null && !t.trim().equals("")) { return t; } if(component instanceof JTextComponent) { t = ((JTextComponent)component).getText(); } if(component instanceof JLabel) { t = ((JLabel)component).getText(); } if(component instanceof AbstractButton) { t = ((AbstractButton)component).getText(); } return t; }
private String calculateText(final Object component) { // prep the text String text = getText(); //make components take priority if(text == null || text.trim().equals("")) { if(text != null && !text.trim().equals("")) { return text; } if(component instanceof JTextComponent) { text = ((JTextComponent)component).getText(); } if(component instanceof JLabel) { text = ((JLabel)component).getText(); } if(component instanceof AbstractButton) { text = ((AbstractButton)component).getText(); } return text; }
private String calculateText(final Object component) { // prep the text String t = getText(); //make components take priority if(text == null || text.trim().equals("")) { if(t != null && !t.trim().equals("")) { return t; } if(component instanceof JTextComponent) { t = ((JTextComponent)component).getText(); } if(component instanceof JLabel) { t = ((JLabel)component).getText(); } if(component instanceof AbstractButton) { t = ((AbstractButton)component).getText(); } return t; }
protected String calculateText(final Object component) { // prep the text String t = getText(); //make components take priority if(text == null || text.trim().equals("")) { if (t != null && !t.trim().equals("")) { return t; } if (component instanceof JTextComponent) { t = ((JTextComponent) component).getText(); } if (component instanceof JLabel) { t = ((JLabel) component).getText(); } if (component instanceof AbstractButton) { t = ((AbstractButton) component).getText(); } return t; }