diff options
author | geronimo <geronimo013@gmx.de> | 2012-08-02 09:30:50 +0200 |
---|---|---|
committer | geronimo <geronimo013@gmx.de> | 2012-08-02 09:30:50 +0200 |
commit | c7d67f443bdfe842c2e356d4edbe345338e3e08d (patch) | |
tree | 9be157c84c35305cafd2f53d347b34ac0200b5a2 /cmpcj/src/de/schwarzrot/cmpc/util | |
parent | adb7d83292e1502ca7c21a123b104412cb22d160 (diff) | |
download | cmp-c7d67f443bdfe842c2e356d4edbe345338e3e08d.tar.gz cmp-c7d67f443bdfe842c2e356d4edbe345338e3e08d.tar.bz2 |
patched client to support the new media types and display extended items
Diffstat (limited to 'cmpcj/src/de/schwarzrot/cmpc/util')
3 files changed, 78 insertions, 45 deletions
diff --git a/cmpcj/src/de/schwarzrot/cmpc/util/MediaTableFormat.java b/cmpcj/src/de/schwarzrot/cmpc/util/MediaTableFormat.java index 7fa5452..d427e83 100644 --- a/cmpcj/src/de/schwarzrot/cmpc/util/MediaTableFormat.java +++ b/cmpcj/src/de/schwarzrot/cmpc/util/MediaTableFormat.java @@ -1,25 +1,25 @@ /** * ======================== legal notice ====================== * - * File: MediaTableFormat.java - * Created: - * 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: MediaTableFormat.java Created: 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 * * -------------------------------------------------------------- */ @@ -33,7 +33,7 @@ import de.schwarzrot.cmpc.domain.Media; public class MediaTableFormat implements TableFormat<Media> { @Override public int getColumnCount() { - return 2; + return 5; } @@ -43,6 +43,12 @@ public class MediaTableFormat implements TableFormat<Media> { case 0: return "Type"; case 1: + return "Format"; + case 2: + return "Width"; + case 3: + return "Height"; + case 4: return "Name"; default: throw new IllegalStateException(); @@ -56,9 +62,33 @@ public class MediaTableFormat implements TableFormat<Media> { case 0: return m.getType(); case 1: + return m.getFormat(); + case 2: + return m.getWidth(); + case 3: + return m.getHeight(); + case 4: return m.getName(); default: throw new IllegalStateException(); } } + + + public int getColumnWidth(int column) { + switch (column) { + case 0: + return 80; + case 1: + return 100; + case 2: + return 60; + case 3: + return 60; + case 4: + return -1; + default: + throw new IllegalStateException(); + } + } } diff --git a/cmpcj/src/de/schwarzrot/cmpc/util/MediaTextFilterator.java b/cmpcj/src/de/schwarzrot/cmpc/util/MediaTextFilterator.java index e41c81f..aa035d9 100644 --- a/cmpcj/src/de/schwarzrot/cmpc/util/MediaTextFilterator.java +++ b/cmpcj/src/de/schwarzrot/cmpc/util/MediaTextFilterator.java @@ -1,25 +1,25 @@ /** * ======================== legal notice ====================== * - * File: MediaTextFilterator.java - * Created: - * 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: MediaTextFilterator.java Created: 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 * * -------------------------------------------------------------- */ @@ -36,5 +36,6 @@ public class MediaTextFilterator implements TextFilterator<Media> { public void getFilterStrings(List<String> baseList, Media m) { baseList.add(m.getName()); baseList.add(m.getSearch()); + baseList.add(m.getFormat()); } } diff --git a/cmpcj/src/de/schwarzrot/cmpc/util/MediaTypeSelect.java b/cmpcj/src/de/schwarzrot/cmpc/util/MediaTypeSelect.java index 033ee53..24cd506 100644 --- a/cmpcj/src/de/schwarzrot/cmpc/util/MediaTypeSelect.java +++ b/cmpcj/src/de/schwarzrot/cmpc/util/MediaTypeSelect.java @@ -1,25 +1,25 @@ /** * ======================== legal notice ====================== * - * File: MediaTypeSelect.java - * Created: - * 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: MediaTypeSelect.java Created: 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 * * -------------------------------------------------------------- */ @@ -141,7 +141,9 @@ public class MediaTypeSelect extends AbstractMatcherEditor<Media> implements Lis private static final String[] iconFiles; static { iconFiles = new String[] { "images/folder_black.png", "images/folder_black_music.png", - "images/folder_black_movies.png", "images/folder_black_dvd.png", "images/folder_black_vdr_old.png", - "images/folder_black_vdr.png", "images/folder_black_photos.png", "images/folder_black.png" }; + "images/folder_black_movies.png", "images/folder_black_i_movies.png", "images/folder_black_dvd.png", + "images/folder_black_i_dvd.png", "images/folder_black_vdr_old.png", + "images/folder_black_i_vdr_old.png", "images/folder_black_vdr.png", "images/folder_black_i_vdr.png", + "images/folder_black_photos.png", "images/folder_black.png" }; } } |