Skip to content

Commit

Permalink
Added utility methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Luc Paour committed Jun 4, 2003
1 parent 9729488 commit 6a3c241
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion 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.*;

Expand All @@ -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;
}
}

0 comments on commit 6a3c241

Please sign in to comment.