import java.util.List;
import java.util.Set;
+import javax.swing.BorderFactory;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JMenuItem;
final static int INPUT_LIMIT = 2;
- final static String SPACE = " ";
public JvCacheableInputBox(String cacheKey)
{
*/
private void initCachePopupMenu()
{
- add(popup);
- setComponentPopupMenu(popup);
pnlDefaultCache.setBackground(Color.WHITE);
+ pnlDefaultCache.setBorder(BorderFactory.createEmptyBorder(0, 19, 0, 0));
txtDefaultCacheSize.setPreferredSize(new Dimension(45, 20));
- lblDefaultCacheSize.setText(SPACE
- + MessageManager.getString("label.default_cache_size"));
+ lblDefaultCacheSize.setText(MessageManager
+ .getString("label.default_cache_size"));
// Force input to accept only Integer entries up to length - INPUT_LIMIT
txtDefaultCacheSize.setDocument(new PlainDocument()
{
txtDefaultCacheSize.setText(appCache.getCacheLmit(cacheKey));
pnlDefaultCache.add(lblDefaultCacheSize);
pnlDefaultCache.add(txtDefaultCacheSize);
- popup.insert(pnlDefaultCache, 0);
-
menuItemClearCache.setText(MessageManager
.getString("action.clear_cached_items"));
menuItemClearCache.addActionListener(new ActionListener()
}
});
+ popup.insert(pnlDefaultCache, 0);
popup.add(menuItemClearCache);
+ setComponentPopupMenu(popup);
+ add(popup);
}
/**