use of javax.swing.ImageIcon in project ACS by ACS-Community.
the class LogFrame method initialize.
/**
* Initialize the content of the frame
*
* @param discardLevel The discard level
* @param unlimited If <code>true</code> the number of logs in memory is unlimited,
* otherwise the default is used
* @param aInfo The audience
*/
private void initialize(LogTypeHelper discardLevel, boolean unlimited, AudienceInfo aInfo) {
setTitle("LoggingClient");
addWindowListener(this);
// Set the icon
ImageIcon image = new ImageIcon(LogFrame.class.getResource("/alma.png"));
setIconImage(image.getImage());
// build the LoggingClient
loggingClient = new LoggingClient(this, LoggingClient.DEFAULT_LOGLEVEL, discardLevel, unlimited, aInfo);
if (loggingClient == null) {
throw new NullPointerException("The logging client is null");
}
this.setRootPane(loggingClient);
// Enable the exit menu
loggingClient.hideExitMenu(false);
// Move the window to the center of the screen
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension windowSize = getSize();
setLocation(Math.max(0, (screenSize.width - windowSize.width) / 2), Math.max(0, (screenSize.height - windowSize.height) / 2));
pack();
setVisible(true);
}
use of javax.swing.ImageIcon in project ACS by ACS-Community.
the class LogMenuBar method getSaveFileMenuItem.
/**
* Returns the SaveFileMenuItem property value.
* @return javax.swing.JMenuItem
*/
public JMenuItem getSaveFileMenuItem() {
if (saveFileMenuItem == null) {
ImageIcon icon = new ImageIcon(LogTypeHelper.class.getResource("/disk.png"));
saveFileMenuItem = new JMenuItem("Save File As", icon);
saveFileMenuItem.setName("SaveFileMenuItem");
}
return saveFileMenuItem;
}
use of javax.swing.ImageIcon in project ACS by ACS-Community.
the class LogMenuBar method getLoadDBMenuItem.
/**
* Returns the LoadDB menu item
*
* @return The LoadDB menu item
*/
public JMenuItem getLoadDBMenuItem() {
if (loadDBMenuItem == null) {
ImageIcon icon = new ImageIcon(LogTypeHelper.class.getResource("/database.png"));
loadDBMenuItem = new JMenuItem("Load from database", icon);
loadDBMenuItem.setName("LoadDBMenuItem");
}
return loadDBMenuItem;
}
use of javax.swing.ImageIcon in project ACS by ACS-Community.
the class LogMenuBar method getFiltersMenuItem.
/**
* Return the editFiltersMenuItem
* @return
*/
public JMenuItem getFiltersMenuItem() {
if (filtersMenuItem == null) {
ImageIcon filterIcon = new ImageIcon(LogTypeHelper.class.getResource("/filters.png"));
filtersMenuItem = new JMenuItem("Filters...", filterIcon);
filtersMenuItem.setName("EditFiltersMenuItem");
}
return filtersMenuItem;
}
use of javax.swing.ImageIcon in project ACS by ACS-Community.
the class LogToolBar method getClearLogsBtn.
/**
*
* @return The button to clear the logs
*/
public JButton getClearLogsBtn() {
if (clearLogsBtn == null) {
// Add the button to delete logs
ImageIcon iconClear = new ImageIcon(LogTypeHelper.class.getResource("/delete.png"));
clearLogsBtn = new JButton("<HTML><FONT size=-2>Clear logs</FONT>", iconClear);
}
return clearLogsBtn;
}
Aggregations