movie discovery, tv discovery
parent
8928f506ca
commit
8f99c48872
@ -1,13 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.7.1">
|
||||
<library name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.7.1/jackson-annotations-2.7.1.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.10.0/jackson-annotations-2.10.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.7.1/jackson-annotations-2.7.1-javadoc.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.10.0/jackson-annotations-2.10.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.7.1/jackson-annotations-2.7.1-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-annotations/2.10.0/jackson-annotations-2.10.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
@ -1,13 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: com.fasterxml.jackson.core:jackson-core:2.7.1">
|
||||
<library name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.7.1/jackson-core-2.7.1.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.10.0/jackson-core-2.10.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.7.1/jackson-core-2.7.1-javadoc.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.10.0/jackson-core-2.10.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.7.1/jackson-core-2.7.1-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-core/2.10.0/jackson-core-2.10.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
@ -1,13 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: com.fasterxml.jackson.core:jackson-databind:2.7.1">
|
||||
<library name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-databind/2.7.1/jackson-databind-2.7.1.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-databind/2.10.0/jackson-databind-2.10.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-databind/2.7.1/jackson-databind-2.7.1-javadoc.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-databind/2.10.0/jackson-databind-2.10.0-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-databind/2.7.1/jackson-databind-2.7.1-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/fasterxml/jackson/core/jackson-databind/2.10.0/jackson-databind-2.10.0-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
@ -1,13 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: com.omertron:themoviedbapi:4.3">
|
||||
<library name="Maven: com.omertron:themoviedbapi:4.4">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/omertron/themoviedbapi/4.3/themoviedbapi-4.3.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/omertron/themoviedbapi/4.4/themoviedbapi-4.4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/omertron/themoviedbapi/4.3/themoviedbapi-4.3-javadoc.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/omertron/themoviedbapi/4.4/themoviedbapi-4.4-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/omertron/themoviedbapi/4.3/themoviedbapi-4.3-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/com/omertron/themoviedbapi/4.4/themoviedbapi-4.4-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
@ -1,13 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: org.apache.commons:commons-lang3:3.4">
|
||||
<library name="Maven: org.apache.commons:commons-lang3:3.7">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-lang3/3.7/commons-lang3-3.7.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4-javadoc.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-lang3/3.7/commons-lang3-3.7-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/commons/commons-lang3/3.7/commons-lang3-3.7-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
@ -1,13 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: org.apache.httpcomponents:httpclient:4.5.1">
|
||||
<library name="Maven: org.apache.httpcomponents:httpclient:4.5.3">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpclient/4.5.1/httpclient-4.5.1.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpclient/4.5.3/httpclient-4.5.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpclient/4.5.1/httpclient-4.5.1-javadoc.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpclient/4.5.3/httpclient-4.5.3-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpclient/4.5.1/httpclient-4.5.1-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpclient/4.5.3/httpclient-4.5.3-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
@ -1,13 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: org.apache.httpcomponents:httpcore:4.4.3">
|
||||
<library name="Maven: org.apache.httpcomponents:httpcore:4.4.6">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpcore/4.4.3/httpcore-4.4.3.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpcore/4.4.6/httpcore-4.4.6.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpcore/4.4.3/httpcore-4.4.3-javadoc.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpcore/4.4.6/httpcore-4.4.6-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpcore/4.4.3/httpcore-4.4.3-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/apache/httpcomponents/httpcore/4.4.6/httpcore-4.4.6-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
@ -1,13 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: org.slf4j:slf4j-api:1.7.16">
|
||||
<library name="Maven: org.slf4j:slf4j-api:1.7.25">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.7.16/slf4j-api-1.7.16.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.7.16/slf4j-api-1.7.16-javadoc.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.7.16/slf4j-api-1.7.16-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
@ -1,13 +1,13 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Maven: org.yamj:api-common:2.0">
|
||||
<library name="Maven: org.yamj:api-common:2.1">
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/yamj/api-common/2.0/api-common-2.0.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/yamj/api-common/2.1/api-common-2.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/yamj/api-common/2.0/api-common-2.0-javadoc.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/yamj/api-common/2.1/api-common-2.1-javadoc.jar!/" />
|
||||
</JAVADOC>
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/yamj/api-common/2.0/api-common-2.0-sources.jar!/" />
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/yamj/api-common/2.1/api-common-2.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</component>
|
||||
@ -0,0 +1,114 @@
|
||||
package at.windesign.application.movie;
|
||||
|
||||
import com.omertron.themoviedbapi.TheMovieDbApi;
|
||||
import com.omertron.themoviedbapi.model.Genre;
|
||||
import com.omertron.themoviedbapi.results.ResultList;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.yamj.api.common.http.SimpleHttpClientBuilder;
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.select.annotation.Wire;
|
||||
import org.zkoss.zk.ui.util.GenericForwardComposer;
|
||||
import org.zkoss.zul.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.SortedMap;
|
||||
import java.util.TreeMap;
|
||||
|
||||
public class movieDiscoverForwardComposer extends GenericForwardComposer<Component>
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final movieDataSource ds = movieDataSource.INSTANCE;
|
||||
private int opacity = 80;
|
||||
|
||||
@Wire
|
||||
private Window discoverMovie;
|
||||
|
||||
@Wire
|
||||
private Groupbox groupboxGenre;
|
||||
|
||||
@Wire
|
||||
private Div divGenre;
|
||||
|
||||
@Wire
|
||||
private Groupbox groupboxSearch;
|
||||
|
||||
@Wire
|
||||
protected Textbox searchText;
|
||||
|
||||
@Wire
|
||||
protected Textbox searchYear;
|
||||
|
||||
@Wire
|
||||
protected Listbox resultList;
|
||||
|
||||
@Wire
|
||||
protected Button searchButton;
|
||||
|
||||
@Wire
|
||||
protected Button cancelButton;
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception
|
||||
{
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
int hD = (int) self.getDesktop().getAttribute("desktopHeight");
|
||||
int wD = (int) self.getDesktop().getAttribute("desktopWidth");
|
||||
|
||||
discoverMovie.setWidth(wD - 10 + "px");
|
||||
discoverMovie.setHeight(hD - 10 + "px");
|
||||
|
||||
SortedMap<Integer, Listheader> listHeader = new TreeMap<>();
|
||||
|
||||
ListModelList resultListModel = new ListModelList();
|
||||
resultList.setModel(resultListModel);
|
||||
resultList.setAttribute("listModelList", resultListModel);
|
||||
|
||||
resultList.getListhead().getChildren().clear();
|
||||
Listhead head = resultList.getListhead();
|
||||
Listheader selected = new Listheader("");
|
||||
Listheader movieName = new Listheader("Movie Name");
|
||||
Listheader voteCount = new Listheader("vote count");
|
||||
Listheader voteAverage = new Listheader("vote average");
|
||||
Listheader firstAired = new Listheader("First Aired");
|
||||
Listheader overview = new Listheader("Overview");
|
||||
|
||||
selected.setHflex("min");
|
||||
movieName.setHflex("min");
|
||||
voteCount.setHflex("min");
|
||||
voteAverage.setHflex("min");
|
||||
firstAired.setHflex("min");
|
||||
overview.setHflex("min");
|
||||
|
||||
head.appendChild(selected);
|
||||
head.appendChild(movieName);
|
||||
head.appendChild(voteCount);
|
||||
head.appendChild(voteAverage);
|
||||
head.appendChild(firstAired);
|
||||
head.appendChild(overview);
|
||||
|
||||
movieDiscoverRenderer renderer = new movieDiscoverRenderer();
|
||||
resultList.setItemRenderer(renderer);
|
||||
|
||||
HttpClient httpClient = new SimpleHttpClientBuilder().build();
|
||||
TheMovieDbApi api = new TheMovieDbApi("a33271b9e54cdcb9a80680eaf5522f1b", httpClient);
|
||||
ResultList<Genre> genres = api.getGenreMovieList("de-DE");
|
||||
|
||||
List<Genre> genreList = genres.getResults();
|
||||
int cols = genreList.size() / 5;
|
||||
if(cols < 1)
|
||||
cols = 1;
|
||||
else if(genreList.size() % 5 != 0)
|
||||
cols++;
|
||||
|
||||
divGenre.setStyle("display: grid; grid-template-columns: repeat(" + cols + ", 1fr); grid-auto-rows: 40px; align-items: left; justify-items: left;");
|
||||
|
||||
for(Genre genre : genreList)
|
||||
{
|
||||
Checkbox checkbox = new Checkbox();
|
||||
checkbox.setLabel(genre.getName());
|
||||
checkbox.setAttribute("genreID", genre.getId());
|
||||
divGenre.insertBefore(checkbox, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
package at.windesign.application.movie;
|
||||
|
||||
import org.zkoss.zul.*;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
public class movieDiscoverRenderer implements ListitemRenderer
|
||||
{
|
||||
private Listbox movieList;
|
||||
|
||||
@Override
|
||||
public void render(Listitem item, Object o, int i) throws Exception
|
||||
{
|
||||
final movieData data = (movieData) o;
|
||||
DecimalFormat format = new DecimalFormat("#.0");
|
||||
|
||||
Listcell selectedCell = new Listcell();
|
||||
Listcell movieNameCell = new Listcell(data.getMovieTitle());
|
||||
Listcell movieVoteCount = new Listcell(String.valueOf(data.getVoteCount()));
|
||||
Listcell movieVoteAverage = new Listcell(format.format(data.getVoteAverage()));
|
||||
Listcell movieFirstAiredCell = new Listcell(String.valueOf(data.getReleaseDate()));
|
||||
Listcell movieOverviewCell = new Listcell(data.getOverview());
|
||||
|
||||
Checkbox checkbox = new Checkbox();
|
||||
checkbox.setParent(selectedCell);
|
||||
selectedCell.setParent(item);
|
||||
movieNameCell.setParent(item);
|
||||
movieVoteCount.setParent(item);
|
||||
movieVoteAverage.setParent(item);
|
||||
movieFirstAiredCell.setParent(item);
|
||||
movieOverviewCell.setParent(item);
|
||||
|
||||
item.setValue(data);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,287 @@
|
||||
package at.windesign.application.movie;
|
||||
|
||||
import com.omertron.themoviedbapi.MovieDbException;
|
||||
import com.omertron.themoviedbapi.TheMovieDbApi;
|
||||
import com.omertron.themoviedbapi.model.discover.Discover;
|
||||
import com.omertron.themoviedbapi.model.discover.WithBuilder;
|
||||
import com.omertron.themoviedbapi.model.movie.MovieBasic;
|
||||
import com.omertron.themoviedbapi.results.ResultList;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.yamj.api.common.http.SimpleHttpClientBuilder;
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.Execution;
|
||||
import org.zkoss.zk.ui.Executions;
|
||||
import org.zkoss.zk.ui.select.SelectorComposer;
|
||||
import org.zkoss.zk.ui.select.annotation.Listen;
|
||||
import org.zkoss.zk.ui.select.annotation.Wire;
|
||||
import org.zkoss.zul.*;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintStream;
|
||||
import java.sql.Date;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.List;
|
||||
|
||||
public class movieDiscoverSelectorComposer extends SelectorComposer<Component>
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Listbox m_movieList;
|
||||
|
||||
@Wire
|
||||
private Window discoverMovie;
|
||||
|
||||
@Wire
|
||||
private Div divGenre;
|
||||
|
||||
@Wire
|
||||
protected Textbox searchText;
|
||||
|
||||
@Wire
|
||||
protected Textbox searchYearGTE;
|
||||
|
||||
@Wire
|
||||
protected Textbox searchYearLTE;
|
||||
|
||||
@Wire
|
||||
protected Textbox searchVoteCountGTE;
|
||||
|
||||
@Wire
|
||||
protected Textbox searchVoteCountLTE;
|
||||
|
||||
@Wire
|
||||
protected Textbox searchVoteGTE;
|
||||
|
||||
@Wire
|
||||
protected Textbox searchVoteLTE;
|
||||
|
||||
@Wire
|
||||
protected Listbox resultList;
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception
|
||||
{
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
final Execution execution = Executions.getCurrent();
|
||||
|
||||
if(execution.getArg().containsKey("movieList"))
|
||||
m_movieList = (Listbox) execution.getArg().get("movieList");
|
||||
}
|
||||
|
||||
@Listen("onClick = #searchButton")
|
||||
public void doSearch()
|
||||
{
|
||||
try
|
||||
{
|
||||
search();
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@Listen("onClick = #saveButton")
|
||||
public void save() throws FileNotFoundException
|
||||
{
|
||||
ListModelList resultListModel = (ListModelList) resultList.getModel();
|
||||
List<movieData> dataList = resultListModel.getInnerList();
|
||||
|
||||
for(int index = 0; index < resultListModel.size(); index++)
|
||||
{
|
||||
Listitem item = resultList.getItemAtIndex(index);
|
||||
|
||||
if(item != null)
|
||||
{
|
||||
Listcell cell = (Listcell) item.getChildren().get(0);
|
||||
|
||||
if(cell != null)
|
||||
{
|
||||
Checkbox box = (Checkbox) cell.getChildren().get(0);
|
||||
|
||||
if(box != null)
|
||||
{
|
||||
if(box.isChecked())
|
||||
{
|
||||
movieData data = dataList.get(index);
|
||||
movieData newMovie = new movieData();
|
||||
|
||||
try
|
||||
{
|
||||
newMovie.fromTMDB(data.getMovieID());
|
||||
newMovie.save();
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
OutputStream tempFile = new FileOutputStream("redir");
|
||||
PrintStream printStream = new PrintStream(tempFile);
|
||||
printStream.print("movie");
|
||||
printStream.close();
|
||||
|
||||
Executions.sendRedirect("");
|
||||
}
|
||||
discoverMovie.onClose();
|
||||
}
|
||||
|
||||
@Listen("onClick = #cancelButton")
|
||||
public void cancel()
|
||||
{
|
||||
discoverMovie.onClose();
|
||||
}
|
||||
|
||||
public void search() throws MovieDbException
|
||||
{
|
||||
int maxPage = 10;
|
||||
int page;
|
||||
|
||||
HttpClient httpClient;
|
||||
httpClient = new SimpleHttpClientBuilder().build();
|
||||
|
||||
TheMovieDbApi api = new TheMovieDbApi("a33271b9e54cdcb9a80680eaf5522f1b", httpClient);
|
||||
|
||||
String sText = searchText.getText();
|
||||
String sYearGTE = searchYearGTE.getText();
|
||||
String sYearLTE = searchYearLTE.getText();
|
||||
int yearGTE;
|
||||
int yearLTE;
|
||||
String sVoteCountGTE = searchVoteCountGTE.getText();
|
||||
String sVoteCountLTE = searchVoteCountLTE.getText();
|
||||
int voteCountGTE;
|
||||
int voteCountLTE;
|
||||
String sVoteGTE = searchVoteGTE.getText();
|
||||
String sVoteLTE = searchVoteLTE.getText();
|
||||
float voteGTE;
|
||||
float voteLTE;
|
||||
|
||||
if(sYearGTE.isEmpty())
|
||||
yearGTE = 0;
|
||||
else
|
||||
yearGTE = Integer.parseInt(sYearGTE);
|
||||
|
||||
if(sYearLTE.isEmpty())
|
||||
yearLTE = 0;
|
||||
else
|
||||
yearLTE = Integer.parseInt(sYearLTE);
|
||||
|
||||
if(yearGTE > 0 && yearLTE == 0)
|
||||
yearLTE = 5000;
|
||||
|
||||
if(sVoteCountGTE.isEmpty())
|
||||
voteCountGTE = 0;
|
||||
else
|
||||
voteCountGTE = Integer.parseInt(sVoteCountGTE);
|
||||
|
||||
if(sVoteCountLTE.isEmpty())
|
||||
voteCountLTE = 0;
|
||||
else
|
||||
voteCountLTE = Integer.parseInt(sVoteCountLTE);
|
||||
|
||||
if(sVoteGTE.isEmpty())
|
||||
voteGTE = 0;
|
||||
else
|
||||
voteGTE = Float.parseFloat(sVoteGTE);
|
||||
|
||||
if(sVoteLTE.isEmpty())
|
||||
voteLTE = 0;
|
||||
else
|
||||
voteLTE = Float.parseFloat(sVoteLTE);
|
||||
|
||||
WithBuilder genres = null;
|
||||
boolean first = true;
|
||||
|
||||
List<Checkbox> genreList = divGenre.getChildren();
|
||||
for(Checkbox genre : genreList)
|
||||
{
|
||||
if(genre.isChecked())
|
||||
{
|
||||
int genreID = (int) genre.getAttribute("genreID");
|
||||
if(first)
|
||||
{
|
||||
genres = new WithBuilder(genreID);
|
||||
first = false;
|
||||
}
|
||||
else
|
||||
genres.and(genreID);
|
||||
}
|
||||
}
|
||||
|
||||
movieData movie;
|
||||
ListModelList resultListModel = (ListModelList) resultList.getModel();
|
||||
|
||||
resultListModel.clear();
|
||||
|
||||
for(page = 1; page <= maxPage; page++)
|
||||
{
|
||||
Discover discover = new Discover();
|
||||
discover.page(page);
|
||||
discover.language("de-DE");
|
||||
discover.includeAdult(true);
|
||||
|
||||
if(yearGTE != 0)
|
||||
discover.primaryReleaseDateGte(yearGTE + "-01-01");
|
||||
else
|
||||
discover.primaryReleaseDateGte("");
|
||||
if(yearLTE != 0)
|
||||
discover.primaryReleaseDateLte(yearLTE + "-12-31");
|
||||
else
|
||||
discover.primaryReleaseDateLte("");
|
||||
discover.voteCountGte(voteCountGTE);
|
||||
discover.voteCountLte(voteCountLTE);
|
||||
discover.voteAverageGte(voteGTE);
|
||||
discover.voteAverageLte(voteLTE);
|
||||
discover.withGenres(genres);
|
||||
discover.withKeywords(sText);
|
||||
|
||||
ResultList<MovieBasic> movies = api.getDiscoverMovies(discover);
|
||||
if(movies.getResults().size() == 0)
|
||||
break;
|
||||
|
||||
for(MovieBasic resultMovie : movies.getResults())
|
||||
{
|
||||
if(!exist(resultMovie.getId()))
|
||||
{
|
||||
movie = new movieData();
|
||||
|
||||
movie.setMovieID(resultMovie.getId());
|
||||
movie.setMovieTitle(resultMovie.getTitle());
|
||||
movie.setVoteCount(resultMovie.getVoteCount());
|
||||
movie.setVoteAverage(resultMovie.getVoteAverage());
|
||||
movie.setReleaseDate(string2Date(resultMovie.getReleaseDate()));
|
||||
movie.setOverview(resultMovie.getOverview());
|
||||
|
||||
resultListModel.add(movie);
|
||||
movie.setModel(resultListModel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Date string2Date(String strDate)
|
||||
{
|
||||
if(strDate == null)
|
||||
return new Date(1900, 1, 1);
|
||||
else if(strDate.isEmpty())
|
||||
return new Date(1900, 1, 1);
|
||||
else
|
||||
return Date.valueOf(strDate);
|
||||
}
|
||||
|
||||
boolean exist(int id)
|
||||
{
|
||||
ListModelList list = (ListModelList) m_movieList.getModel();
|
||||
List<movieData> dataList = list.getInnerList();
|
||||
|
||||
for(movieData data : dataList)
|
||||
{
|
||||
if(id == data.getMovieID())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,114 @@
|
||||
package at.windesign.application.serie;
|
||||
|
||||
import com.omertron.themoviedbapi.TheMovieDbApi;
|
||||
import com.omertron.themoviedbapi.model.Genre;
|
||||
import com.omertron.themoviedbapi.results.ResultList;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.yamj.api.common.http.SimpleHttpClientBuilder;
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.select.annotation.Wire;
|
||||
import org.zkoss.zk.ui.util.GenericForwardComposer;
|
||||
import org.zkoss.zul.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.SortedMap;
|
||||
import java.util.TreeMap;
|
||||
|
||||
public class serieDiscoverForwardComposer extends GenericForwardComposer<Component>
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final serieDataSource ds = serieDataSource.INSTANCE;
|
||||
private int opacity = 80;
|
||||
|
||||
@Wire
|
||||
private Window discoverSerie;
|
||||
|
||||
@Wire
|
||||
private Groupbox groupboxGenre;
|
||||
|
||||
@Wire
|
||||
private Div divGenre;
|
||||
|
||||
@Wire
|
||||
private Groupbox groupboxSearch;
|
||||
|
||||
@Wire
|
||||
protected Textbox searchText;
|
||||
|
||||
@Wire
|
||||
protected Textbox searchYear;
|
||||
|
||||
@Wire
|
||||
protected Listbox resultList;
|
||||
|
||||
@Wire
|
||||
protected Button searchButton;
|
||||
|
||||
@Wire
|
||||
protected Button cancelButton;
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception
|
||||
{
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
int hD = (int) self.getDesktop().getAttribute("desktopHeight");
|
||||
int wD = (int) self.getDesktop().getAttribute("desktopWidth");
|
||||
|
||||
discoverSerie.setWidth(wD - 10 + "px");
|
||||
discoverSerie.setHeight(hD - 10 + "px");
|
||||
|
||||
SortedMap<Integer, Listheader> listHeader = new TreeMap<>();
|
||||
|
||||
ListModelList resultListModel = new ListModelList();
|
||||
resultList.setModel(resultListModel);
|
||||
resultList.setAttribute("listModelList", resultListModel);
|
||||
|
||||
resultList.getListhead().getChildren().clear();
|
||||
Listhead head = resultList.getListhead();
|
||||
Listheader selected = new Listheader("");
|
||||
Listheader serieName = new Listheader("TV Show Name");
|
||||
Listheader voteCount = new Listheader("vote count");
|
||||
Listheader voteAverage = new Listheader("vote average");
|
||||
Listheader firstAired = new Listheader("First Aired");
|
||||
Listheader overview = new Listheader("Overview");
|
||||
|
||||
selected.setHflex("min");
|
||||
serieName.setHflex("min");
|
||||
voteCount.setHflex("min");
|
||||
voteAverage.setHflex("min");
|
||||
firstAired.setHflex("min");
|
||||
overview.setHflex("min");
|
||||
|
||||
head.appendChild(selected);
|
||||
head.appendChild(serieName);
|
||||
head.appendChild(voteCount);
|
||||
head.appendChild(voteAverage);
|
||||
head.appendChild(firstAired);
|
||||
head.appendChild(overview);
|
||||
|
||||
serieDiscoverRenderer renderer = new serieDiscoverRenderer();
|
||||
resultList.setItemRenderer(renderer);
|
||||
|
||||
HttpClient httpClient = new SimpleHttpClientBuilder().build();
|
||||
TheMovieDbApi api = new TheMovieDbApi("a33271b9e54cdcb9a80680eaf5522f1b", httpClient);
|
||||
ResultList<Genre> genres = api.getGenreTVList("de-DE");
|
||||
|
||||
List<Genre> genreList = genres.getResults();
|
||||
int cols = genreList.size() / 5;
|
||||
if(cols < 1)
|
||||
cols = 1;
|
||||
else if(genreList.size() % 5 != 0)
|
||||
cols++;
|
||||
|
||||
divGenre.setStyle("display: grid; grid-template-columns: repeat(" + cols + ", 1fr); grid-auto-rows: 40px; align-items: left; justify-items: left;");
|
||||
|
||||
for(Genre genre : genreList)
|
||||
{
|
||||
Checkbox checkbox = new Checkbox();
|
||||
checkbox.setLabel(genre.getName());
|
||||
checkbox.setAttribute("genreID", genre.getId());
|
||||
divGenre.insertBefore(checkbox, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
package at.windesign.application.serie;
|
||||
|
||||
import at.windesign.application.movie.movieData;
|
||||
import org.zkoss.zul.*;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
public class serieDiscoverRenderer implements ListitemRenderer
|
||||
{
|
||||
private Listbox serieList;
|
||||
|
||||
@Override
|
||||
public void render(Listitem item, Object o, int i) throws Exception
|
||||
{
|
||||
final serieData data = (serieData) o;
|
||||
DecimalFormat format = new DecimalFormat("#.0");
|
||||
|
||||
Listcell selectedCell = new Listcell();
|
||||
Listcell serieNameCell = new Listcell(data.getSeriesName());
|
||||
Listcell serieVoteCount = new Listcell(String.valueOf(data.getSeriesVoteCount()));
|
||||
Listcell serieVoteAverage = new Listcell(format.format(data.getSeriesVoteAverage()));
|
||||
Listcell serieFirstAiredCell = new Listcell(String.valueOf(data.getSeriesFirstAired()));
|
||||
Listcell serieOverviewCell = new Listcell(data.getSeriesOverview());
|
||||
|
||||
Checkbox checkbox = new Checkbox();
|
||||
checkbox.setParent(selectedCell);
|
||||
selectedCell.setParent(item);
|
||||
serieNameCell.setParent(item);
|
||||
serieVoteCount.setParent(item);
|
||||
serieVoteAverage.setParent(item);
|
||||
serieFirstAiredCell.setParent(item);
|
||||
serieOverviewCell.setParent(item);
|
||||
|
||||
item.setValue(data);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,286 @@
|
||||
package at.windesign.application.serie;
|
||||
|
||||
import com.omertron.themoviedbapi.MovieDbException;
|
||||
import com.omertron.themoviedbapi.TheMovieDbApi;
|
||||
import com.omertron.themoviedbapi.model.discover.Discover;
|
||||
import com.omertron.themoviedbapi.model.discover.WithBuilder;
|
||||
import com.omertron.themoviedbapi.model.tv.TVBasic;
|
||||
import com.omertron.themoviedbapi.results.ResultList;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.yamj.api.common.http.SimpleHttpClientBuilder;
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.Execution;
|
||||
import org.zkoss.zk.ui.Executions;
|
||||
import org.zkoss.zk.ui.select.SelectorComposer;
|
||||
import org.zkoss.zk.ui.select.annotation.Listen;
|
||||
import org.zkoss.zk.ui.select.annotation.Wire;
|
||||
import org.zkoss.zul.*;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.PrintStream;
|
||||
import java.sql.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class serieDiscoverSelectorComposer extends SelectorComposer<Component>
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
private Listbox m_serieList;
|
||||
|
||||
@Wire
|
||||
private Window discoverSerie;
|
||||
|
||||
@Wire
|
||||
private Div divGenre;
|
||||
|
||||
@Wire
|
||||
protected Textbox searchText;
|
||||
|
||||
@Wire
|
||||
protected Textbox searchYearGTE;
|
||||
|
||||
@Wire
|
||||
protected Textbox searchYearLTE;
|
||||
|
||||
@Wire
|
||||
protected Textbox searchVoteCountGTE;
|
||||
|
||||
@Wire
|
||||
protected Textbox searchVoteCountLTE;
|
||||
|
||||
@Wire
|
||||
protected Textbox searchVoteGTE;
|
||||
|
||||
@Wire
|
||||
protected Textbox searchVoteLTE;
|
||||
|
||||
@Wire
|
||||
protected Listbox resultList;
|
||||
|
||||
@Override
|
||||
public void doAfterCompose(Component comp) throws Exception
|
||||
{
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
final Execution execution = Executions.getCurrent();
|
||||
|
||||
if(execution.getArg().containsKey("serieList"))
|
||||
m_serieList = (Listbox) execution.getArg().get("serieList");
|
||||
}
|
||||
|
||||
@Listen("onClick = #searchButton")
|
||||
public void doSearch()
|
||||
{
|
||||
try
|
||||
{
|
||||
search();
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@Listen("onClick = #saveButton")
|
||||
public void save() throws FileNotFoundException
|
||||
{
|
||||
ListModelList resultListModel = (ListModelList) resultList.getModel();
|
||||
List<serieData> dataList = resultListModel.getInnerList();
|
||||
|
||||
for(int index = 0; index < resultListModel.size(); index++)
|
||||
{
|
||||
Listitem item = resultList.getItemAtIndex(index);
|
||||
|
||||
if(item != null)
|
||||
{
|
||||
Listcell cell = (Listcell) item.getChildren().get(0);
|
||||
|
||||
if(cell != null)
|
||||
{
|
||||
Checkbox box = (Checkbox) cell.getChildren().get(0);
|
||||
|
||||
if(box != null)
|
||||
{
|
||||
if(box.isChecked())
|
||||
{
|
||||
serieData data = dataList.get(index);
|
||||
serieData newSerie = new serieData();
|
||||
|
||||
try
|
||||
{
|
||||
newSerie.fromTMDB(data.getSeriesID());
|
||||
newSerie.save();
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
OutputStream tempFile = new FileOutputStream("redir");
|
||||
PrintStream printStream = new PrintStream(tempFile);
|
||||
printStream.print("serie");
|
||||
printStream.close();
|
||||
|
||||
Executions.sendRedirect("");
|
||||
}
|
||||
discoverSerie.onClose();
|
||||
}
|
||||
|
||||
@Listen("onClick = #cancelButton")
|
||||
public void cancel()
|
||||
{
|
||||
discoverSerie.onClose();
|
||||
}
|
||||
|
||||
public void search() throws MovieDbException
|
||||
{
|
||||
int maxPage = 10;
|
||||
int page;
|
||||
|
||||
HttpClient httpClient;
|
||||
httpClient = new SimpleHttpClientBuilder().build();
|
||||
|
||||
TheMovieDbApi api = new TheMovieDbApi("a33271b9e54cdcb9a80680eaf5522f1b", httpClient);
|
||||
|
||||
String sText = searchText.getText();
|
||||
String sYearGTE = searchYearGTE.getText();
|
||||
String sYearLTE = searchYearLTE.getText();
|
||||
int yearGTE;
|
||||
int yearLTE;
|
||||
String sVoteCountGTE = searchVoteCountGTE.getText();
|
||||
String sVoteCountLTE = searchVoteCountLTE.getText();
|
||||
int voteCountGTE;
|
||||
int voteCountLTE;
|
||||
String sVoteGTE = searchVoteGTE.getText();
|
||||
String sVoteLTE = searchVoteLTE.getText();
|
||||
float voteGTE;
|
||||
float voteLTE;
|
||||
|
||||
if(sYearGTE.isEmpty())
|
||||
yearGTE = 0;
|
||||
else
|
||||
yearGTE = Integer.parseInt(sYearGTE);
|
||||
|
||||
if(sYearLTE.isEmpty())
|
||||
yearLTE = 0;
|
||||
else
|
||||
yearLTE = Integer.parseInt(sYearLTE);
|
||||
|
||||
if(yearGTE > 0 && yearLTE == 0)
|
||||
yearLTE = 5000;
|
||||
|
||||
if(sVoteCountGTE.isEmpty())
|
||||
voteCountGTE = 0;
|
||||
else
|
||||
voteCountGTE = Integer.parseInt(sVoteCountGTE);
|
||||
|
||||
if(sVoteCountLTE.isEmpty())
|
||||
voteCountLTE = 0;
|
||||
else
|
||||
voteCountLTE = Integer.parseInt(sVoteCountLTE);
|
||||
|
||||
if(sVoteGTE.isEmpty())
|
||||
voteGTE = 0;
|
||||
else
|
||||
voteGTE = Float.parseFloat(sVoteGTE);
|
||||
|
||||
if(sVoteLTE.isEmpty())
|
||||
voteLTE = 0;
|
||||
else
|
||||
voteLTE = Float.parseFloat(sVoteLTE);
|
||||
|
||||
WithBuilder genres = null;
|
||||
boolean first = true;
|
||||
|
||||
List<Checkbox> genreList = divGenre.getChildren();
|
||||
for(Checkbox genre : genreList)
|
||||
{
|
||||
if(genre.isChecked())
|
||||
{
|
||||
int genreID = (int) genre.getAttribute("genreID");
|
||||
if(first)
|
||||
{
|
||||
genres = new WithBuilder(genreID);
|
||||
first = false;
|
||||
}
|
||||
else
|
||||
genres.and(genreID);
|
||||
}
|
||||
}
|
||||
|
||||
serieData serie;
|
||||
ListModelList resultListModel = (ListModelList) resultList.getModel();
|
||||
|
||||
resultListModel.clear();
|
||||
|
||||
for(page = 1; page <= maxPage; page++)
|
||||
{
|
||||
Discover discover = new Discover();
|
||||
discover.page(page);
|
||||
discover.language("de-DE");
|
||||
discover.includeAdult(true);
|
||||
|
||||
if(yearGTE != 0)
|
||||
discover.primaryReleaseDateGte(yearGTE + "-01-01");
|
||||
else
|
||||
discover.primaryReleaseDateGte("");
|
||||
if(yearLTE != 0)
|
||||
discover.primaryReleaseDateLte(yearLTE + "-12-31");
|
||||
else
|
||||
discover.primaryReleaseDateLte("");
|
||||
discover.voteCountGte(voteCountGTE);
|
||||
discover.voteCountLte(voteCountLTE);
|
||||
discover.voteAverageGte(voteGTE);
|
||||
discover.voteAverageLte(voteLTE);
|
||||
discover.withGenres(genres);
|
||||
discover.withKeywords(sText);
|
||||
|
||||
ResultList<TVBasic> series = api.getDiscoverTV(discover);
|
||||
if(series.getResults().size() == 0)
|
||||
break;
|
||||
|
||||
for(TVBasic resultSerie : series.getResults())
|
||||
{
|
||||
if(!exist(resultSerie.getId()))
|
||||
{
|
||||
serie = new serieData();
|
||||
|
||||
serie.setSeriesID(resultSerie.getId());
|
||||
serie.setSeriesName(resultSerie.getName());
|
||||
serie.setSeriesVoteCount(resultSerie.getVoteCount());
|
||||
serie.setSeriesVoteAverage(resultSerie.getVoteAverage());
|
||||
serie.setSeriesFirstAired(string2Date(resultSerie.getFirstAirDate()));
|
||||
serie.setSeriesOverview(resultSerie.getOverview());
|
||||
|
||||
resultListModel.add(serie);
|
||||
serie.setModel(resultListModel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Date string2Date(String strDate)
|
||||
{
|
||||
if(strDate == null)
|
||||
return new Date(1900, 1, 1);
|
||||
else if(strDate.isEmpty())
|
||||
return new Date(1900, 1, 1);
|
||||
else
|
||||
return Date.valueOf(strDate);
|
||||
}
|
||||
|
||||
boolean exist(int id)
|
||||
{
|
||||
ListModelList list = (ListModelList) m_serieList.getModel();
|
||||
List<serieData> dataList = list.getInnerList();
|
||||
|
||||
for(serieData data : dataList)
|
||||
{
|
||||
if(id == data.getSeriesID())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,71 @@
|
||||
<window id="discoverMovie"
|
||||
title="discover Movies"
|
||||
contentStyle="overflow:auto"
|
||||
border="normal"
|
||||
apply="at.windesign.application.movie.movieDiscoverForwardComposer,at.windesign.application.movie.movieDiscoverSelectorComposer"
|
||||
width="500px"
|
||||
height="500px">
|
||||
<groupbox id="groupboxGenre"
|
||||
contentStyle="overflow: auto;">
|
||||
<caption label="Genre"/>
|
||||
<nodom>
|
||||
<div sclass="grid"
|
||||
id="divGenre">
|
||||
</div>
|
||||
</nodom>
|
||||
</groupbox>
|
||||
<groupbox id="groupboxSearch"
|
||||
>
|
||||
<nodom>
|
||||
<div sclass="grid"
|
||||
width="100%"
|
||||
style="display: grid; grid-template-columns: 10fr 2fr 2fr 2fr 2fr 2fr 2fr 1fr; grid-gap: 10px; justify-items: center">
|
||||
<label value="Search"/>
|
||||
<label value="Year from"/>
|
||||
<label value="to"/>
|
||||
<label value="vote count from"/>
|
||||
<label value="to"/>
|
||||
<label value="vote average from"/>
|
||||
<label value="to (max 10)"/>
|
||||
<label value=""/>
|
||||
<textbox id="searchText"
|
||||
width="100%"
|
||||
tabindex="2"/>
|
||||
<textbox id="searchYearGTE"
|
||||
width="100%"
|
||||
tabindex="3"/>
|
||||
<textbox id="searchYearLTE"
|
||||
width="100%"
|
||||
tabindex="4"/>
|
||||
<textbox id="searchVoteCountGTE"
|
||||
width="100%"
|
||||
tabindex="5"/>
|
||||
<textbox id="searchVoteCountLTE"
|
||||
width="100%"
|
||||
tabindex="6"/>
|
||||
<textbox id="searchVoteGTE"
|
||||
width="100%"
|
||||
tabindex="7"/>
|
||||
<textbox id="searchVoteLTE"
|
||||
width="100%"
|
||||
tabindex="8"/>
|
||||
<button id="searchButton"
|
||||
label="search"/>
|
||||
</div>
|
||||
</nodom>
|
||||
</groupbox>
|
||||
<listbox id="resultList"
|
||||
multiple="true"
|
||||
autopaging="true"
|
||||
vflex="true">
|
||||
<listhead sizable="true"
|
||||
>
|
||||
</listhead>
|
||||
</listbox>
|
||||
<hlayout>
|
||||
<button id="saveButton"
|
||||
label="save"/>
|
||||
<button id="cancelButton"
|
||||
label="cancel"/>
|
||||
</hlayout>
|
||||
</window>
|
||||
@ -0,0 +1,71 @@
|
||||
<window id="discoverSerie"
|
||||
title="discover TV Shows"
|
||||
contentStyle="overflow:auto"
|
||||
border="normal"
|
||||
apply="at.windesign.application.serie.serieDiscoverForwardComposer,at.windesign.application.serie.serieDiscoverSelectorComposer"
|
||||
width="500px"
|
||||
height="500px">
|
||||
<groupbox id="groupboxGenre"
|
||||
contentStyle="overflow: auto;">
|
||||
<caption label="Genre"/>
|
||||
<nodom>
|
||||
<div sclass="grid"
|
||||
id="divGenre">
|
||||
</div>
|
||||
</nodom>
|
||||
</groupbox>
|
||||
<groupbox id="groupboxSearch"
|
||||
>
|
||||
<nodom>
|
||||
<div sclass="grid"
|
||||
width="100%"
|
||||
style="display: grid; grid-template-columns: 10fr 2fr 2fr 2fr 2fr 2fr 2fr 1fr; grid-gap: 10px; justify-items: center">
|
||||
<label value="Search"/>
|
||||
<label value="Year from"/>
|
||||
<label value="to"/>
|
||||
<label value="vote count from"/>
|
||||
<label value="to"/>
|
||||
<label value="vote average from"/>
|
||||
<label value="to (max 10)"/>
|
||||
<label value=""/>
|
||||
<textbox id="searchText"
|
||||
width="100%"
|
||||
tabindex="2"/>
|
||||
<textbox id="searchYearGTE"
|
||||
width="100%"
|
||||
tabindex="3"/>
|
||||
<textbox id="searchYearLTE"
|
||||
width="100%"
|
||||
tabindex="4"/>
|
||||
<textbox id="searchVoteCountGTE"
|
||||
width="100%"
|
||||
tabindex="5"/>
|
||||
<textbox id="searchVoteCountLTE"
|
||||
width="100%"
|
||||
tabindex="6"/>
|
||||
<textbox id="searchVoteGTE"
|
||||
width="100%"
|
||||
tabindex="7"/>
|
||||
<textbox id="searchVoteLTE"
|
||||
width="100%"
|
||||
tabindex="8"/>
|
||||
<button id="searchButton"
|
||||
label="search"/>
|
||||
</div>
|
||||
</nodom>
|
||||
</groupbox>
|
||||
<listbox id="resultList"
|
||||
multiple="true"
|
||||
autopaging="true"
|
||||
vflex="true">
|
||||
<listhead sizable="true"
|
||||
>
|
||||
</listhead>
|
||||
</listbox>
|
||||
<hlayout>
|
||||
<button id="saveButton"
|
||||
label="save"/>
|
||||
<button id="cancelButton"
|
||||
label="cancel"/>
|
||||
</hlayout>
|
||||
</window>
|
||||
Binary file not shown.
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
#Generated by Maven
|
||||
#Thu Feb 25 15:44:13 CET 2021
|
||||
#Tue Mar 02 14:21:10 CET 2021
|
||||
groupId=at.windesign.application
|
||||
artifactId=multimedia
|
||||
version=1.0-SNAPSHOT
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,27 +1,51 @@
|
||||
<div id="centerSeries"
|
||||
vflex="true"
|
||||
apply="at.windesign.application.serie.serieListForwardComposer, at.windesign.application.serie.serieListSelectorComposer"
|
||||
vflex="true"
|
||||
apply="at.windesign.application.serie.serieListForwardComposer, at.windesign.application.serie.serieListSelectorComposer"
|
||||
>
|
||||
<hbox width="100%" widths="50%,50%" pack="stretch">
|
||||
<button width="100%"
|
||||
id="updateAll"
|
||||
label="update all"
|
||||
>
|
||||
</button>
|
||||
<button width="100%"
|
||||
id="updateOpen"
|
||||
label="update open"
|
||||
>
|
||||
</button>
|
||||
</hbox>
|
||||
<listbox id="seriesList"
|
||||
multiple="true"
|
||||
autopaging="true"
|
||||
vflex="true">
|
||||
<listhead sizable="true"
|
||||
>
|
||||
</listhead>
|
||||
<!-- https://stackoverflow.com/questions/28629458/display-image-from-db-on-zk-zul-listbox-->
|
||||
<!-- https://www.zkoss.org/zksandbox/#u6-->
|
||||
</listbox>
|
||||
<vlayout>
|
||||
<hbox width="100%" widths="25%,25%,25%,25%" pack="stretch">
|
||||
<button width="100%"
|
||||
id="updateAll"
|
||||
label="update all"
|
||||
>
|
||||
</button>
|
||||
<button width="100%"
|
||||
id="updateOpen"
|
||||
label="update open"
|
||||
>
|
||||
</button>
|
||||
<button width="100%"
|
||||
id="searchSerie"
|
||||
label="search TV Show"
|
||||
>
|
||||
</button>
|
||||
<button width="100%"
|
||||
id="discoverSerie"
|
||||
label="discover TV Show"
|
||||
>
|
||||
</button>
|
||||
</hbox>
|
||||
</vlayout>
|
||||
<listbox id="seriesList"
|
||||
multiple="true"
|
||||
autopaging="true"
|
||||
vflex="true"
|
||||
context="seriePopup"
|
||||
>
|
||||
<listhead sizable="true"
|
||||
>
|
||||
</listhead>
|
||||
<!-- https://stackoverflow.com/questions/28629458/display-image-from-db-on-zk-zul-listbox-->
|
||||
<!-- https://www.zkoss.org/zksandbox/#u6-->
|
||||
</listbox>
|
||||
|
||||
<menupopup id="seriePopup">
|
||||
<menu label="set status">
|
||||
<menupopup>
|
||||
<menuitem label="set all Progress to Done"/>
|
||||
</menupopup>
|
||||
</menu>
|
||||
<menuitem label="update"/>
|
||||
<menuitem label="delete"/>
|
||||
</menupopup>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue