Now I know that this question has been asked already, but the solution there didn't help me much
As the title suggests, I am looking for a way to implement an Outlook like calendar into my JavaFX application.
I already tried out fullcalendar, but I didn't manage to start the jQueries, which are needed. I tried a lot of methods, but they either aren't working or I'm too dumb to implement it correctly
I also tried jfxtras agenda, I really like the controls and the look of it, unfortunately I'm a rather inexperienced programmer and therefore I'm not really capable of saving these entries
So, if someone could show me an easy - to - implement calendar or a guide to either fullcalendar or jfxtras agenda, I would be very grateful
Thanks in advance
EDIT:
Here are the links,
1) Fullcalendar How to add JQuery onto JavaFx WebView
2) Similar question: Outlook like calendar control in JavaFX 2.0+
Well, JFXtras has a samples in which you can add appointments to Agenda. You can download it from the jfxtras.org website and play with it.
The source code ain't that complex (all you need to do is implement an add appointment callback, see line 44.), but you will need to code yourself. Agenda only does the displaying of the appointments, it is your responsibility to store and retrieve them from your domain model.
https://github.com/JFXtras/jfxtras-labs-samples/blob/8.0/src/main/java/jfxtras/samples/controls/agenda/AgendaSample1.java
Basically what you need to do is:
implement the localDateTimeRangeCallback and set the appointment collection in that method with data from your domain
implement newAppointmentCallback and store new appointments in your domain
monitor the appointments collection for removals, and remove the corresponding appointments in your domain.
Related
I want to have a list of pre-fabricated templates, where each item in the list has a first name, last name, and buttons that relate to that item in the list (Delete, rename, extra info, etc.) what would be the best way to do this?
The closest thing I can think of that would be similar would be something like a twitter feed: http://www.androidguys.com/wp-content/uploads/2013/12/Twitter-Feed.png
Where each "post" is based on a standard template, and database info is plugged into it, as well as buttons that belong to that post.
Currently I have it so my app uses a list of fragments, but that seems really hacked together and takes a lot of time to load more than a few of them.
Is there an alternative? I think I read somewhere of someone recommending another person to create a custom viewadapter, but as I am still somewhat new to android, I'm not sure if this is the best way to do it.
I'm wondering if it's possible to add some custom screen GUI's to my Bukkit server. So I can display a lot of text on someone's screen. Or do I need to find another option to do this?
Thanks!
The only practical way is to use an Inventory using blocks with name and lore for users to click on as can be seen here
As Cole Nelson mentioned, a custom inventory with lore displayed might work. A good guide for that can be found on the bukkit forums, and although it's a bit outdated it should still provide useful information.
Another possibility would be to utilize title screens; obviously those can't hold a ton of information, but the player is pretty much guaranteed to notice them immediatly.
I recommend using Title Api, as it's a bit tedious to directly work with packets.
Once you added the jar to your project and set the dependency, simply use:
TitleAPI.sendTitle(player,fadeIn,stay,fadeOut,"Title","Subtitle");
to send a title with all corresponding attributes.
Example result:
I was working on creating a weather application in Java using Weather Underground and I found that it does have data for some cities.
Initially, I was planning on using GeopIP to get the user's location automatically but since the support for cities is limited I decided to let the user choose the city every time the program starts.
I want the user to be able to choose a city from one that is supported by Weather Underground. The user will enter the name and as he/she enters the name, the possible locations will be displayed in a way similar to the one shown in the picture.
My question is:
How do I implement this search feature ?
My initial guess was to create a Vector containing all the names of the cities and then use brute force to find the match and display in a JPopup or a JWindow containing a JList but I guess there has to be a better method
Rephrase:
What I do not understand is WHAT INFO do I keep in the data structure I must use ? Should I manually create a list of cities that Weather Underground supports or is there another way to do it ?
Take a look at the Trie data structure (also known as digital tree or prefix tree). Autocompletion is one of the most common examples of it's usefulness.
The following article has a nice an very approachable explanation:
Roll your own autocomplete solution using Tries.
if you google autosuggestcombobox you will get some interesting results:
This one is written in JavaFX - I have used and extended it myself already. It is quite useful. What you get "for free" with JavaFX: a context menu with right-mouse click which is auto-generated containing some of the usual "stuff", like cut, copy & paste and even undo! So, I can recommend that solution. To get into JavaFX isn't so hard - and I think it is much easier to learn than Swing - and looks so much cooler! However this implementation has some drawbacks - especially when the layout is not left-aligned, because it is simply a text field on top of a combobox.
OK - but if you want to stick to Swing - you could probably use this one. I haven't used that myself, but the code looks quite straightforward and pretty clean - cleaner than the implementation for JavaFX I must admit (but that had some nice features). So - maybe you try - and extend it? It is built simply on JComboBox.
I have been wondering about this, which is why I have put off learning app development for so long. Let's say I was making a school timetable app, that all the user had to do was enter the name of their course, and then the app shows the timetable for that course..
The questions is can I get information from the college or do I have to hard code it into the database myself?
How does one get information to use if they need it?
Thanks
It depends. Does the college provide you an interface you can use? Probably not one that was meant to be used by a third party app.
If not, then you have to somehow get the information into your database. Either per parsing their online HTML schedules or inputing it by hand (obviously always one of the last options to consider).
If the college had a website that you could view, you could scan the page for class listings and pull that data in - but more than likely that sort of data will need to be entered manually by you when you ship the app.
If college is having its website and the website provides RSS feed for time table you parse that XML file and show the data which is parse or you can save the time table information of which course in the database and display that using cursors.
I'm currently working with a team on a project that will serve as a campus-wide event calendar for my school. We're designing it to be a web application using JSP having a java back end and connected to a relational database located on a server. The database will store events and produce a calendar on the web page based on the events.
Users will also be able to conduct searches and we would like to return a calendar based on the search results (such as activities occurring during a particular a time frame). Potentially we would be creating 100's of calendars at a time to accommodate multiple user requests.
We don't want users to need any special account to use the site (except maybe an account with us). The users will not be editing the events and changing anything but we want a nice GUI interface for them.
Is this a possible task to achieve using the Google Calendar API?
Just to clarify, we will be performing sql queries to construct a list of "events" in a separate section of our application. With this in mind, we do NOT want a calendar that queries our database on its own. We would like a API that allows us to input this list of events, and would output a calendar GUI that provides a user with access to multiple views (daily, weekly, monthly, etc) in an easy-to-use format.
thanks!
It sounds like a decent use of the Google Calendar API to me. After browsing through the API docs for Java, it looks like you can create a calendar, add whatever events to it you wish, and pass a link to that calendar back to the user. In fact, the API page I linked mentions that "you can generate a public calendar for Google Calendar to display, based on your organization's event database". This sounds like exactly like what you are wanting to do. Try out some of the sample code there and see if it looks like it will meet your needs.
I totally agree with bta and have an additional idea:
You said:
The database will store events and
produce a calendar on the web page
based on the events.
You would benefit even more from using Google Calendar in this case. You wouldn't need a database to store the events which has many pros:
You would eliminate a possible bottleneck, because as you said there would be 100s of calendars generated at the same time,
You could have non-tech-savvy people to manage calendars (I believe Google's interface is pretty simple, compared to the backend you would have to develop)
You would eliminate the need for backend (or at least the part responsible for event CRUDs)
You can always "wrap" Google Galendar using its API, so the GUI would be completely up to you,
These are just some of my thoughts, because I believe that simple is better. I hope this will be helpful.
Good luck developing your app!
P.S. If you could, please tell us which method you used and how its working :)