/** Check the post box. */ private void checkPostBox() { postCharCount.setInnerText(Integer.toString(POST_MAX - postBox.getText().length())); if (POST_MAX - postBox.getText().length() < 0) { postCharCount.addClassName(style.postCharCountOverLimit()); } else { postCharCount.removeClassName(style.postCharCountOverLimit()); } if ((postBox.getText().length() > 0 && POST_MAX - postBox.getText().length() >= 0) || attachment != null) { postButton.removeStyleName(style.postButtonInactive()); } else { postButton.addStyleName(style.postButtonInactive()); } }