/** * main entrypoint - starts the part when it is run as an application * * @param args java.lang.String[] */ public static void main(java.lang.String[] args) { try { Frame frame = new java.awt.Frame(); AddressBookSelectionUI aAddressBookSelectionUI; aAddressBookSelectionUI = new AddressBookSelectionUI(); frame.add("Center", aAddressBookSelectionUI); frame.setSize(aAddressBookSelectionUI.getSize()); frame.addWindowListener( new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent e) { System.exit(0); }; }); frame.setVisible(true); } catch (Throwable exception) { System.err.println("Exception occurred in main() of java.awt.Panel"); exception.printStackTrace(System.out); } }
/** * Called with a DjVuBean property has changed. * * @param e the PropertyChangeEvent. */ public void propertyChange(final PropertyChangeEvent e) { try { final String name = e.getPropertyName(); if ("page".equalsIgnoreCase(name)) { final Object object = e.getNewValue(); if (object instanceof Number) { setCheckedPage(((Number) object).intValue() - 1); } } else if ("propertyName".equalsIgnoreCase(name)) { final String propertyName = (String) e.getNewValue(); if ("navpane".equalsIgnoreCase(propertyName)) { setVisible("Outline".equalsIgnoreCase(djvuBean.properties.getProperty(propertyName))); } } } catch (final Throwable exp) { exp.printStackTrace(DjVuOptions.err); System.gc(); } }