This repository has been archived by the owner on Jun 22, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
home screen - added twitter, events and blog posts panels.
- Loading branch information
unknown
committed
Jul 27, 2011
1 parent
05ca443
commit 495e0a9
Showing
6 changed files
with
142 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,5 +39,4 @@ public void init() { | |
mainWindow.addComponent(layout); | ||
setMainWindow(mainWindow); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
usergroup-portal/src/main/java/ugportal/ui/vaadin/home/blogposts/BlogPostsPanel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* BlogPostsPanel.java, 27.7.2011 13:04:45 | ||
*/ | ||
package ugportal.ui.vaadin.home.blogposts; | ||
|
||
import com.vaadin.ui.Label; | ||
|
||
import ugportal.ui.vaadin.component.UgPanel; | ||
|
||
/** | ||
* @author Ondrej Kvasnovsky | ||
*/ | ||
public class BlogPostsPanel extends UgPanel { | ||
|
||
/** | ||
* serialVersionUID | ||
*/ | ||
private static final long serialVersionUID = -2991931688786507107L; | ||
|
||
/** | ||
* Creates new instance. | ||
* | ||
* @param caption | ||
*/ | ||
public BlogPostsPanel(String caption) { | ||
super(caption); | ||
Label lblTitle = new Label("Blog posts"); | ||
addComponent(lblTitle); | ||
} | ||
|
||
} |
31 changes: 31 additions & 0 deletions
31
usergroup-portal/src/main/java/ugportal/ui/vaadin/home/events/EventsPanel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* EventsPanel.java, 27.7.2011 13:04:31 | ||
*/ | ||
package ugportal.ui.vaadin.home.events; | ||
|
||
import com.vaadin.ui.Label; | ||
|
||
import ugportal.ui.vaadin.component.UgPanel; | ||
|
||
/** | ||
* @author Ondrej Kvasnovsky | ||
*/ | ||
public class EventsPanel extends UgPanel { | ||
|
||
/** | ||
* serialVersionUID | ||
*/ | ||
private static final long serialVersionUID = 5460100070350560381L; | ||
|
||
/** | ||
* Creates new instance. | ||
* | ||
* @param caption | ||
*/ | ||
public EventsPanel(String caption) { | ||
super(caption); | ||
Label lblTitle = new Label("Events"); | ||
addComponent(lblTitle); | ||
} | ||
|
||
} |
44 changes: 44 additions & 0 deletions
44
usergroup-portal/src/main/java/ugportal/ui/vaadin/home/twitter/TwitterPanel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* TwitterPanel.java, 27.7.2011 12:59:52 | ||
*/ | ||
package ugportal.ui.vaadin.home.twitter; | ||
|
||
import java.io.ByteArrayInputStream; | ||
import java.io.IOException; | ||
|
||
import ugportal.ui.vaadin.component.UgPanel; | ||
|
||
import com.vaadin.ui.CustomLayout; | ||
|
||
/** | ||
* @author Ondrej Kvasnovsky | ||
*/ | ||
public class TwitterPanel extends UgPanel { | ||
|
||
/** | ||
* serialVersionUID | ||
*/ | ||
private static final long serialVersionUID = -1258239136644410258L; | ||
|
||
/** | ||
* Creates new instance. | ||
* | ||
* @param caption | ||
*/ | ||
public TwitterPanel(final String caption) { | ||
super(caption); | ||
final String javaScript = "<div /><script src=\"http://widgets.twimg.com/j/2/widget.js\"></script>" | ||
+ "<script> new TWTR.Widget({ version: 2, type: 'faves', rpp: 10, interval: 6000, title: 'Tweets by', subject: 'Java User Group - Ostrava'," | ||
+ "width: 'auto', height: 300, theme: { shell: { background: '#f14d1a', color: '#ffffff' }, tweets: { background: '#ffffff'," | ||
+ "color: '#444444', links: '#f14d1a' } }, features: { scrollbar: true, loop: false, live: true, hashtags: true, timestamp: true," | ||
+ "avatars: true, behavior: 'all' }}).render().setUser('@OstravaJUG').start();</script>"; | ||
try { | ||
CustomLayout custom = new CustomLayout(new ByteArrayInputStream(javaScript.getBytes())); | ||
custom.setWidth("290px"); | ||
custom.setHeight("390px"); | ||
addComponent(custom); | ||
} catch (IOException e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
} |