westoncb / hndesktop Goto Github PK
View Code? Open in Web Editor NEWA Kotlin/Swing desktop application front-end for Hacker News
License: MIT License
A Kotlin/Swing desktop application front-end for Hacker News
License: MIT License
If I'm not mistaken we can retrieve data much more efficiently this way, and have a better mechanism than polling to get updates on changed content.
If you press the 'View page' button in the upper right corner, the first time it will successfully replace the comments panel with a webview component. But on all subsequent attempts, the webview component will not load the page.
I kind of don't like the hackernews website design so i really could need a desktop client but HNDesktop ist really beautiful ;)
Maybe you could use a LAF that looks a bit nicer? A really good one is WebLAF: https://github.com/mgarin/weblaf
Have you tried the native UI Look and Feel?
https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
Here is the code example I'm referring to
public static void main(String[] args) {
try {
// Set System L&F
UIManager.setLookAndFeel(
UIManager.getSystemLookAndFeelClassName());
}
catch (UnsupportedLookAndFeelException e) {
// handle exception
}
catch (ClassNotFoundException e) {
// handle exception
}
catch (InstantiationException e) {
// handle exception
}
catch (IllegalAccessException e) {
// handle exception
}
new SwingApplication(); //Create and show the GUI.
}
For example, when new stories show up on the front page, automatically update the UI to reflect this.
Right now we use one JTextPane (which does HTML rendering [since the HN API gives back html for comments)] per comment, and showing a UI with tons of these can make things sluggish, especially on scrolling. Is there a more performant way of rendering comments?
Right now they appear in blue like hypertext, but clicking does nothing.
Doesn't seem to support side scrolling gesture from a touchpad. Up and down work perfectly fine.
Trying from Debian 3.16.43-2 and Gnome 3
Fresh Linux Mint 18.2 (Ubuntu 16.04) install, with apt install maven
followed by mvn package
, yields a bunch of lines of output and then
[INFO] Compiling Kotlin sources from [/home/wchargin/git/HNDesktop/src/main/java]
[INFO] Module name is HNDesktop
[ERROR] /home/wchargin/git/HNDesktop/src/main/java/App.kt: (5, 8) Unresolved reference: javafx
[ERROR] /home/wchargin/git/HNDesktop/src/main/java/App.kt: (6, 8) Unresolved reference: javafx
[ERROR] /home/wchargin/git/HNDesktop/src/main/java/App.kt: (7, 8) Unresolved reference: javafx
[ERROR] /home/wchargin/git/HNDesktop/src/main/java/App.kt: (8, 8) Unresolved reference: javafx
[ERROR] /home/wchargin/git/HNDesktop/src/main/java/App.kt: (72, 20) Unresolved reference: JFXPanel
[ERROR] /home/wchargin/git/HNDesktop/src/main/java/App.kt: (223, 13) Unresolved reference: Platform
[ERROR] /home/wchargin/git/HNDesktop/src/main/java/App.kt: (224, 31) Unresolved reference: WebView
[ERROR] /home/wchargin/git/HNDesktop/src/main/java/App.kt: (225, 34) Unresolved reference: Scene
I haven't used JavaFX or Kotlin, but I see that it's not mentioned in the pom.xml
anywhere. Perhaps you need to add a dependency?
Maven and Java versions:
$ mvn -version
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_131, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.10.0-32-generic", arch: "amd64", family: "unix"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.