From c7d67f443bdfe842c2e356d4edbe345338e3e08d Mon Sep 17 00:00:00 2001 From: geronimo Date: Thu, 2 Aug 2012 09:30:50 +0200 Subject: patched client to support the new media types and display extended items --- .../de/schwarzrot/cmpc/util/MediaTableFormat.java | 60 ++++++++++++++++------ .../schwarzrot/cmpc/util/MediaTextFilterator.java | 29 ++++++----- .../de/schwarzrot/cmpc/util/MediaTypeSelect.java | 34 ++++++------ 3 files changed, 78 insertions(+), 45 deletions(-) (limited to 'cmpcj/src/de/schwarzrot/cmpc/util') 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: Geronimo - * Project: cmpc - a java frontend (client) part of compound media player - * uses external players to play the media + * File: MediaTableFormat.java Created: Author: Geronimo 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 { @Override public int getColumnCount() { - return 2; + return 5; } @@ -43,6 +43,12 @@ public class MediaTableFormat implements TableFormat { 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 { 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: Geronimo - * Project: cmpc - a java frontend (client) part of compound media player - * uses external players to play the media + * File: MediaTextFilterator.java Created: Author: Geronimo 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 { public void getFilterStrings(List 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: Geronimo - * Project: cmpc - a java frontend (client) part of compound media player - * uses external players to play the media + * File: MediaTypeSelect.java Created: Author: Geronimo 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 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" }; } } -- cgit v1.2.3