diff --git a/com/gallery/GalleryRemote/prefs/PreferencePanel.java b/com/gallery/GalleryRemote/prefs/PreferencePanel.java index c66df23..3400424 100644 --- a/com/gallery/GalleryRemote/prefs/PreferencePanel.java +++ b/com/gallery/GalleryRemote/prefs/PreferencePanel.java @@ -1,6 +1,7 @@ package com.gallery.GalleryRemote.prefs; import com.gallery.GalleryRemote.GalleryProperties; +import com.gallery.GalleryRemote.MainFrame; import javax.swing.*; @@ -10,13 +11,39 @@ * Date: May 8, 2003 */ public abstract class PreferencePanel extends JPanel { - public JPanel panel = new JPanel(); + protected JPanel panel = new JPanel(); + protected boolean hasBeenRead = false; + MainFrame mainFrame = null; + JDialog dialog = null; public abstract JLabel getIcon(); + public boolean isReversible() { + return true; + } + public abstract void buildUI(); + public void readPropertiesFirst(GalleryProperties props) { + if (! hasBeenRead) { + hasBeenRead = true; + readProperties(props); + } + } + public abstract void readProperties(GalleryProperties props); public abstract void writeProperties(GalleryProperties props); + + public boolean hasBeenRead() { + return hasBeenRead; + } + + public void setMainFrame(MainFrame mainFrame) { + this.mainFrame = mainFrame; + } + + public void setDialog(JDialog dialog) { + this.dialog = dialog; + } }