public void componentShown(ComponentEvent Event)
{
PersistentConfiguration.setWindowVisible("matrix", true);
}
});
m_MatrixWindow.addInternalFrameListener(new InternalFrameAdapter()
{
public void internalFrameActivated(InternalFrameEvent Event)
{
m_Configuration.setActiveWindow("Matrix");
}
public void internalFrameDeactivated(InternalFrameEvent Event)
{
m_Configuration.setActiveWindow("");
}
});
m_MatrixWindow.getContentPane().setLayout(new BorderLayout());
JScrollPane scrollPane = new JScrollPane(m_MatrixPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
scrollPane.setBorder(BorderFactory.createEmptyBorder());
m_MatrixWindow.getContentPane().add(_matrixControllerPanel, BorderLayout.WEST);
m_MatrixWindow.getContentPane().add(scrollPane, BorderLayout.CENTER);
m_MatrixWindow.setSize(PersistentConfiguration.getWindowWidth("matrix"), PersistentConfiguration.getWindowHeight("matrix"));
m_MatrixWindow.setLocation(PersistentConfiguration.getWindowLeft("matrix"), PersistentConfiguration.getWindowTop("matrix"));
m_MatrixWindow.setVisible(PersistentConfiguration.getWindowVisible("matrix"));
m_MatrixWindow.setDefaultCloseOperation(JInternalFrame.HIDE_ON_CLOSE);
m_MatrixWindow.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_T, 0), "transmit");
m_MatrixWindow.getActionMap().put("transmit", new AbstractAction()
{
public void actionPerformed(ActionEvent Event)
{
m_Configuration.transmitNow();
_matrixControllerPanel.transmitted();
}
});
}
}
{
if(m_PresetsWindow == null)
{
m_PresetsWindow = new ProgramsWindow(m_Configuration);
m_PresetsWindow.addComponentListener(new ComponentListener()
{
public void componentHidden(ComponentEvent Event)
{
PersistentConfiguration.setWindowVisible("presets", false);
}
public void componentMoved(ComponentEvent Event)
{
PersistentConfiguration.setWindowLeft("presets", Event.getComponent().getLocation().x);
PersistentConfiguration.setWindowTop("presets", Event.getComponent().getLocation().y);
}
public void componentResized(ComponentEvent Event)
{
PersistentConfiguration.setWindowWidth("presets", Event.getComponent().getSize().width);
PersistentConfiguration.setWindowHeight("presets", Event.getComponent().getSize().height);
}
public void componentShown(ComponentEvent Event)
{
PersistentConfiguration.setWindowVisible("presets", true);
}
});
m_PresetsWindow.addInternalFrameListener(new InternalFrameAdapter()
{
public void internalFrameActivated(InternalFrameEvent Event)
{
m_Configuration.setActiveWindow("Presets");
}
public void internalFrameDeactivated(InternalFrameEvent Event)
{
m_Configuration.setActiveWindow("");
}
});
m_PresetsWindow.setSize(PersistentConfiguration.getWindowWidth("presets"), PersistentConfiguration.getWindowHeight("presets"));
m_PresetsWindow.setLocation(PersistentConfiguration.getWindowLeft("presets"), PersistentConfiguration.getWindowTop("presets"));
m_PresetsWindow.setVisible(PersistentConfiguration.getWindowVisible("presets"));
m_PresetsWindow.setDefaultCloseOperation(JInternalFrame.HIDE_ON_CLOSE);
}
}
{
if(m_EditPresetNamesWindow == null)
{
m_EditPresetNamesWindow = new EditPresetNamesWindow(m_Configuration);
m_EditPresetNamesWindow.addComponentListener(new ComponentListener()
{
public void componentHidden(ComponentEvent Event)
{
PersistentConfiguration.setWindowVisible("edit-preset-names", false);
}
public void componentMoved(ComponentEvent Event)
{
PersistentConfiguration.setWindowLeft("edit-preset-names", Event.getComponent().getLocation().x);
PersistentConfiguration.setWindowTop("edit-preset-names", Event.getComponent().getLocation().y);
}
public void componentResized(ComponentEvent Event)
{
PersistentConfiguration.setWindowWidth("edit-preset-names", Event.getComponent().getSize().width);
PersistentConfiguration.setWindowWidth("edit-preset-names", Event.getComponent().getSize().height);
}
public void componentShown(ComponentEvent Event)
{
PersistentConfiguration.setWindowVisible("edit-preset-names", true);
}
});
m_EditPresetNamesWindow.addInternalFrameListener(new InternalFrameAdapter()
{
public void internalFrameActivated(InternalFrameEvent Event)
{
m_Configuration.setActiveWindow("EditPresetNames");
}
public void internalFrameDeactivated(InternalFrameEvent Event)
{
m_Configuration.setActiveWindow("");
}
});
m_EditPresetNamesWindow.setSize(PersistentConfiguration.getWindowWidth("edit-preset-names"), PersistentConfiguration.getWindowHeight("edit-preset-names"));
m_EditPresetNamesWindow.setLocation(PersistentConfiguration.getWindowLeft("edit-preset-names"), PersistentConfiguration.getWindowTop("edit-preset-names"));
m_EditPresetNamesWindow.setVisible(PersistentConfiguration.getWindowVisible("edit-preset-names"));
m_EditPresetNamesWindow.setDefaultCloseOperation(JInternalFrame.HIDE_ON_CLOSE);
}
}
{
if(_editDeviceNamesWindow == null)
{
_editDeviceNamesWindow = new EditDeviceNamesWindow(m_Configuration);
_editDeviceNamesWindow.addComponentListener(new ComponentListener()
{
public void componentHidden(ComponentEvent Event)
{
PersistentConfiguration.setWindowVisible("edit-device-names", false);
}
public void componentMoved(ComponentEvent Event)
{
PersistentConfiguration.setWindowLeft("edit-device-names", Event.getComponent().getLocation().x);
PersistentConfiguration.setWindowTop("edit-device-names", Event.getComponent().getLocation().y);
}
public void componentResized(ComponentEvent Event)
{
PersistentConfiguration.setWindowWidth("edit-device-names", Event.getComponent().getSize().width);
PersistentConfiguration.setWindowWidth("edit-device-names", Event.getComponent().getSize().height);
}
public void componentShown(ComponentEvent Event)
{
PersistentConfiguration.setWindowVisible("edit-device-names", true);
}
});
_editDeviceNamesWindow.addInternalFrameListener(new InternalFrameAdapter()
{
public void internalFrameActivated(InternalFrameEvent Event)
{
m_Configuration.setActiveWindow("EditDeviceNames");
}