Search in sources :

Example 1 with ILog

use of com.ramussoft.common.logger.ILog in project ramus by Vitaliy-Yakovchuk.

the class LogPlugin method getActions.

@Override
public Action[] getActions(final TableTabView tableView) {
    return new Action[] { new AbstractAction("EventType.qualifierLog", new ImageIcon(getClass().getResource("/com/ramussoft/client/log/log.png"))) {

        /**
         */
        private static final long serialVersionUID = 8698485078278772063L;

        {
            putValue(LONG_DESCRIPTION, getString("EventType.qualifierLog"));
        }

        @Override
        public void actionPerformed(ActionEvent e) {
            GUIFramework framework = tableView.getFramework();
            long qId = tableView.getQualifier().getId();
            List<Event> events = ((ILog) framework.getEngine()).getEventsWithParams(new String[] { EngineLogExtension.QUALIFIER_ID }, new Object[] { qId }, 150);
            ElementLogDialog dialog = new ElementLogDialog(events, framework.getEngine());
            dialog.setSize(800, 600);
            dialog.setLocationRelativeTo(null);
            dialog.setTitle(getString("EventType.qualifierLog"));
            Options.loadOptions(dialog);
            dialog.setVisible(true);
            Options.saveOptions(dialog);
        }
    } };
}
Also used : ImageIcon(javax.swing.ImageIcon) Action(javax.swing.Action) AbstractAction(javax.swing.AbstractAction) ActionEvent(java.awt.event.ActionEvent) GUIFramework(com.ramussoft.gui.common.GUIFramework) Event(com.ramussoft.common.logger.Event) ActionEvent(java.awt.event.ActionEvent) ILog(com.ramussoft.common.logger.ILog) AbstractAction(javax.swing.AbstractAction)

Aggregations

Event (com.ramussoft.common.logger.Event)1 ILog (com.ramussoft.common.logger.ILog)1 GUIFramework (com.ramussoft.gui.common.GUIFramework)1 ActionEvent (java.awt.event.ActionEvent)1 AbstractAction (javax.swing.AbstractAction)1 Action (javax.swing.Action)1 ImageIcon (javax.swing.ImageIcon)1