use of alma.acs.logging.archive.ArchiveConnectionManager in project ACS by ACS-Community.
the class LoggingClient method initialize.
/**
* Initializes the object.
*
* @param logLevel The initial log level to set in the toolbar and in the table
* @param discardLevel The initial discard level to set in the toolbar and in the engine
* @param unlimited If <code>true</code> the number of logs in memory is unlimited,
* otherwise the default is used
*/
private void initialize(LogTypeHelper logLevel, LogTypeHelper discardLevel, boolean unlimited) {
try {
setName("LoggingClientPanel");
messageTextArea = new ExtendedTextArea();
// Set the glass pane showing errors and messages to be acknowledged
glassPane = new TransparentGlassPane(getContentPane());
setGlassPane(glassPane);
// We want to be notified when the user presses the Ok button
// of the MessageWidget
errorWidget.addAckListener(this);
// Set the tooltip manager
ToolTipManager toolTipManager = ToolTipManager.sharedInstance();
toolTipManager.setDismissDelay(60000);
Dimension d = new Dimension(750, 550);
setPreferredSize(d);
getContentPane().setLayout(new BorderLayout());
setJMenuBar(menuBar);
// Add the GUI in the center position
getContentPane().add(getJFrameContentPane(), BorderLayout.CENTER);
// The panel having the toolbars on top and the panel showing errors at the bottom
JPanel northPanel = new JPanel(new BorderLayout());
// Add the toolbars to the toolbarsPanel
JPanel toolbarsPanel = new JPanel();
BoxLayout toolbarLayout = new BoxLayout(toolbarsPanel, BoxLayout.Y_AXIS);
toolbarsPanel.setLayout(toolbarLayout);
toolBar = new LogToolBar(logLevel, discardLevel);
boolean zoomAvailable = zoom.isAvailable();
toolBar.setZoomable(zoomAvailable);
menuBar.getManualZoomMI().setEnabled(zoomAvailable);
toolbarsPanel.add(toolBar);
navigationToolbar = new LogNavigationBar(getLogEntryTable());
toolbarsPanel.add(navigationToolbar);
northPanel.add(toolbarsPanel, BorderLayout.NORTH);
northPanel.add(errorWidget, BorderLayout.SOUTH);
getContentPane().add(northPanel, BorderLayout.NORTH);
initConnections();
validate();
getLogEntryTable().setLogLevel((LogTypeHelper) toolBar.getLogLevelCB().getSelectedItem());
if (unlimited) {
userPreferences.setMaxLogs(0);
}
getLCModel1().setTimeFrame(userPreferences.getMillisecondsTimeFrame());
getLCModel1().setMaxLog(userPreferences.getMaxNumOfLogs());
archive = new ArchiveConnectionManager(this);
setTableFilterLbl();
setEngineFilterLbl();
setNumberOfLogsLbl();
} catch (java.lang.Throwable ivjExc) {
handleException(ivjExc);
}
getTableDetailsVrPane().setDividerLocation(getTableDetailsVrPane().getLastDividerLocation());
//getHeight() - 150);
getStatusAreaHrPane().setDividerLocation(350);
}
Aggregations