diff options
author | geronimo <geronimo013@gmx.de> | 2012-08-16 09:47:55 +0200 |
---|---|---|
committer | geronimo <geronimo013@gmx.de> | 2012-08-16 09:47:55 +0200 |
commit | 301f77acdd559f0a5acb5d6750e025c4bd195b82 (patch) | |
tree | 071ec43d81f101b7beb720767b3f0ee098754004 /cmpcj/src/de/schwarzrot/base/util | |
parent | 7573668ef0324f4a5050be428b15e40f7fa61ac3 (diff) | |
download | cmp-301f77acdd559f0a5acb5d6750e025c4bd195b82.tar.gz cmp-301f77acdd559f0a5acb5d6750e025c4bd195b82.tar.bz2 |
fixed revoke of config dialog, and genre editing, improved visual consistency
Diffstat (limited to 'cmpcj/src/de/schwarzrot/base/util')
-rw-r--r-- | cmpcj/src/de/schwarzrot/base/util/AbstractDialog.java | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/cmpcj/src/de/schwarzrot/base/util/AbstractDialog.java b/cmpcj/src/de/schwarzrot/base/util/AbstractDialog.java index 80fed51..e51b46d 100644 --- a/cmpcj/src/de/schwarzrot/base/util/AbstractDialog.java +++ b/cmpcj/src/de/schwarzrot/base/util/AbstractDialog.java @@ -1,25 +1,25 @@ /** * ======================== legal notice ====================== * - * File: AbstractDialog.java - * Created: 13. June 2012, 04:57 - * Author: <a href="mailto:geronimo013@gmx.de">Geronimo</a> - * Project: cmpc - a java frontend (client) part of compound media player - * uses external players to play the media + * File: AbstractDialog.java Created: 13. June 2012, 04:57 Author: <a + * href="mailto:geronimo013@gmx.de">Geronimo</a> Project: cmpc - a java frontend + * (client) part of compound media player uses external players to play the + * media * * CMP - compound media player * - * is a client/server mediaplayer intended to play any media from any workstation - * without the need to export or mount shares. cmps is an easy to use backend - * with a (ready to use) HTML-interface. Additionally the backend supports - * authentication via HTTP-digest authorization. - * cmpc is a client with vdr-like osd-menues. + * is a client/server mediaplayer intended to play any media from any + * workstation without the need to export or mount shares. cmps is an easy to + * use backend with a (ready to use) HTML-interface. Additionally the backend + * supports authentication via HTTP-digest authorization. cmpc is a client with + * vdr-like osd-menues. * - * Copyright (c) 2012 Reinhard Mantey, some rights reserved! - * published under Creative Commons by-sa - * For details see http://creativecommons.org/licenses/by-sa/3.0/ + * Copyright (c) 2012 Reinhard Mantey, some rights reserved! published under + * Creative Commons by-sa For details see + * http://creativecommons.org/licenses/by-sa/3.0/ * - * The cmp project's homepage is at http://projects.vdr-developer.org/projects/cmp + * The cmp project's homepage is at + * http://projects.vdr-developer.org/projects/cmp * * -------------------------------------------------------------- */ @@ -27,6 +27,7 @@ package de.schwarzrot.base.util; import java.awt.BorderLayout; +import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Window; import java.awt.event.ActionEvent; @@ -57,7 +58,6 @@ public abstract class AbstractDialog extends JDialog { setTitle(msgBundle.getMessage(getClass().getSimpleName() + ".title")); this.dialogMode = dialogMode; this.buttonOrientation = buttonOrientation; - msgBundle = ApplicationServiceProvider.getService(MessageBundle.class); } @@ -137,6 +137,10 @@ public abstract class AbstractDialog extends JDialog { getContentPane().add(createContentPane(), BorderLayout.CENTER); getContentPane().add(createButtons(), BorderLayout.SOUTH); pack(); + if (fixedSize != null) { + setSize(fixedSize); + setResizable(false); + } setLocationRelativeTo(parent); setVisible(true); dispose(); @@ -167,8 +171,14 @@ public abstract class AbstractDialog extends JDialog { protected void performReset() { } - protected MessageBundle msgBundle; + + protected void setFixedSize(Dimension size) { + fixedSize = size; + } + + protected final MessageBundle msgBundle; private int result = CLOSE_OPTION; + private Dimension fixedSize; private DialogMode dialogMode; private Orientation buttonOrientation; } |