What about creating a Slider interface as a counterpart of ListIterator

I am currently working on a student project of a game. I have took this opportunity to play more with programming, algorithms and design. That is where my curiosity is coming from.
I want to add a feature, which would allow to accelarate and slow down the pace, at which time in the game pases. From the alogirithmical point of view I need a list structure containing all posible ratios (ranging from close to 0 to far behind 1) with a default value initially set to 1. I thought I would use ListIterator<Double> interface. However it has some quirks. First when I am moving to the right and at one point I decide to move to the left I will have to know to invoke previous() method twice. Second it has completely unnecessary methods concerned with indexes.
My question is: are there any interface and maybe some additional (could be abstract) classes better suited for a task of this kind in the wild?
Thank you,
With regards,
Bartek

The base for my UI is a self made text-based screen embeded in a simple GUI made with Swing.
Here is a brief description of how everything works:
The screen shows text picture. Text picture is just a simple 2 dimensional matrix, which values are characters. To represent it I wrote the following interface:
public interface Picture extends TimeUpdatable {
     public int getWidth();
     public int getHeight();
     public char getPoint(int x, int y);
*Updates its state after the given <tt>amountOfTime</tt> has elapsed since last update.*
*@param amountOfTime*
     public void update(long amountOfTime);
     public boolean setScreenMode(boolean screenMode);
     public void init();
     public boolean isInitialized();
     public static class InitializedStatus {
          private boolean state = false;
          public boolean isInitialized() {
               return state;
          public void setInitialized() {
               state = true;
}I have written also two important abstract classes to allow for easy generation of more sophisticated pictures. Just for an example you can build a picture from other premade pictures by putting them on a canvas one at a time. The final picture generated by the actual application is rendered by a dedicated module (also self made) on the screen component on my Swing GUI. I made a class Updater solely responsible for refreshing the state of the game and for refreshing its picture on the screen via the aforementioned dedicated module. The game state is being refreshed in regular, frequent intervals.
End of description.
As you can see I did not mean any Swing/AWT GUI component. In truth I don't need ANY visual component at all. The relative speed of the game would be adjusted with keyboard and there would only be (but not necessarily) a status window (confirming a change) shown on top for a few seconds.
What I definitely need is a data structure, which I could utilize to build this and any other similar functionality. I have already implemented this functionality with the Slider interface I have already shown in this thread. The only think is, that it would be wise to use a similar interface, if it existed already in the standard API or some other API widely acclaimed in the developers' community. It's not good to reinvent the wheel.
If you still don't get my intentions maybe this [screenshot of the game|http://picasaweb.google.com/bartek.krzywania ChessTextModeGame#5371365518732532946] will be helpful. It shows the settings page. Unfortunately it's in polish only by now (though this should not matter at this point). In the foreground you can see a simple notice massage about a game speed change, which set to hover there for 2 secs.
I hope I made my ideas reasonably clear in this post.
With regards,
Bartek
Edited by: Bartek-Krzywania on 2009-08-18 20:05

Similar Messages

  • What about creating an itunes user?

    It's anoying trying to access the itunes musica store, and notice that because I'm from Argentina I can't have a user.
    Why may I register a apple user and not an Itunes one?
    Why should I send my credit information to access to the store?
    And why apple advertises that I can use features as album art and afterwards I cant access them because of this.
    I've been an owner of an ipod since day one, been using itunes software because apple doesn't give me any alternative, and even though I use this. And I still cant get the support I want...

    Until there is a store for Argentina, I'm afraid you're out of luck. In order to buy from another country's store, you will have to have a credit card with a billing address in that country. These rules are required by the record companies, not Apple, as it seems that record companies do not care for cross-border sales.

  • How do I create a slide where users can upload a file to server or email a file?

    Could anyone guide me in how I could go about creating a slide where users can either email a file or upload it to my server?
    Any help would be greatly appriciated...
    Steve

    Hello,
    Welcome to Adobe Forums.
    I am not sure how you can Upload a file, you might need a Javascript.
    You can create a slide and a button of that slide can call the default Email client (MS Outlook, Outlook Express....)
    1) On  you Slide insert a button (Insert -> Standard Object -> Button
    2) Double Click on that button and select "Open URL or file" for On Success (Under Properties Inspector)
    3) Write "mailto:[email protected]" in the URL box (For Example : [email protected])
    4) Publish the result, when you click on the button, it will call the default mail client.
    Screenshot :
    Note : This might not work if you have a Network Security which do not allow calling Mail Client through a Script (Clicking of Button calls the script)
    Thanks,
    Vikram

  • I have created a slide show with music but when i view it or attempt to burn to a CD or even copy to hard drive after about 15 sec the program stops working and it shuts down

    Elements 10 was deactivated on desktop and installed on new laptop.  Have on
    y used it for photo editing until yesterday. Created a slide show with music but every time I try to burn to cd or move it to hard drive after about 15 sec, it says windows has encountered a problem with this program and must shut down.
    I Also can't sign in to adobe with the program. It simply spins and I had to force close the program.
    help!?

    I am using photoshop Elements 10 under the create tab...slide show.
    Used it on my desktop several times. Deactivated it and installed on new lap top about 5 months ago.  Had not used it other than for photo editing until today.
    I can also not login in thru the program. It simply spins and I finally had to force close the program
    Toni V. Sloan
    Sent from my iPad
    On Jun 27, 2014, at 7:03 PM, Chris Cox <[email protected]>
    I have created a slide show with music but when i view it or attempt to burn to a CD or even copy to hard drive after about 15 sec the program stops working and it shuts down
    created by Chris Cox in Photoshop General Discussion - View the full discussion
    Photoshop doesn't do slideshows… What software are you using?
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6504356#6504356
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Photoshop General Discussion by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • 10Express web admin interface - what about 11g standard/enterprise?

    hello
    With 10Express we have this web interface
    http://www.herongyang.com/jdbc/Oracle-Server-Web-Interface.html
    With the web interface I can easily check/uncheck rights...
    What about 11g standard or enterprise - they don't have a web interface I presume?
    I need to check (then grant) if a user "dev" has permission to create/drop/execute immediate table/sequence/stored procedure/function/types/packages
    so first i need to be able to enumerate grants on user "dev"
    Thanks

    Thanks
    Is this version for Express only, or good for 11g Standard+Enterprise as well?
    http://www.oracle.com/technology/products/database/application_express/download.html
    I am trying to digg up information on version db it supports - looking at wiki not sure why it's saying from 9i and on APEX is preinstalled? I searched "Start menu" didn't find it. I checked "Oracle Universal Installer", and confirmed that yes I don't yet have APEX installed.
    +"Oracle Application Express can be installed in an Oracle 9.2 or higher database, and starting from Oracle 11g it will be preinstalled along with the database."+
    http://en.wikipedia.org/wiki/Oracle_Application_Express
    And I checked 11g doc, don't see APEX version requirements...
    http://www.oracle.com/technology/obe/11gr1_db/index.htm
    Is this right for 11g?
    http://www.oracle.com/technology/products/database/application_express/download.html
    How can you tell?
    Many Thanks

  • Firefox is refusing to start. It says that my profile is missing, which it appears to be. Yet the way in which one goes about creating a new profile wont' work either. Anybody have a bloody clue what's going on and how to fix it?

    Firefox is refusing to start. It says that my profile is missing, which it appears to be. Yet the way in which one goes about creating a new profile wont' work either. Anybody have a bloody clue what's going on and how to fix it?

    AIR give you classes to detect an on-line or off-line status, it's in 
    this way for the sake of flexibility for instance what happens if you 
    only what to sync  data only on Saturdays at 2 am? If it were done 
    automatically that'll be a problem. And it isn't so complicated.
    You can download the SalesBuilder from AIR examples at www.adobe.com/devnet/air
      it's an application that does everything you have in mind.
    I don't understand your question abou file types.
    An AIR app can communicate with almost every backend served tech 
    CF, .Net, PHP, RoR.
    Sincerely,
    Michael
    El 14/05/2009, a las 8:48, IrishAIRMax <[email protected]> escribió:
    >
    I have to say that I'm loving the picture! well cool!
    >
    Sorry but I don't quiet understand. I thought AIR did the updating 
    automatically? I didn't realise the developer had to program the 
    logic of how the updates take place?  Is it a case in most AIR apps 
    that when online the app updates the server and once every intervel 
    (of however long) the local SQLite DB is synced to the more updated 
    server DB. Then when offline the developer has to sense that the app 
    is offline and store a log manually of the updates without any help 
    from AIR itself, and then update once it comes online again?
    >
    Can AIR link to anything more than a database on the server side 
    apart from webservices, for example .as files or any other file types?
    >
    What type of server is a Flex app stored on, is it a specific Adobe 
    server rather than a Java or .NET server?
    >
    Thank you so much for your last comment!
    IrishAIRMax
    >

  • I have a acrobat reader, can I import text delimited data format to a PDF Form so that it can auto fill into forms that was created? If not, what about FDF and XML data

    I have a acrobat reader, can I import text delimited data format to a PDF Form so that it can auto fill into forms that was created? If not, what about FDF and XML data

    Yes, you can do all of that via Tools - Forms - More Form Options - Import Data, if you have Acrobat.
    If you only have the free Reader then you can still do it, but it requires a script.

  • So I wanna go about creating a iPhone app. What would be the easiest and cheapest route? Thanks everyone!

    So I wanna go about creating a iPhone app. What would be the easiest and cheapest route? Thanks everyone!

    Download Xcode, learn Objective-C, practice endlessly, purchase Apple Dev status, then publish your work.

  • What is the meaning of "Item Created by Posting Interface" flag

    I saw a flag checked in Display Document : Offsetting item window. Below is the F1 help of it. But still I didnot get the concept of this flag.
    Item Created by Posting Interface
    Use
    Indicates that the G/L item is generated in the posting interface for Contract Accounts Receivable/Payable (FI-CA).
    This indicator is required internally by the system in order to be able to execute all the activities necessary for resetting cleared items.
    Examples
    The following items posted during clearing carry this indicator:
    Cash discount deductions
    Other deductions within tolerances
    Exchange rate differences
    Tax adjustments
    Also the field next to this flag contains one value and that field has below F1-help
    Transaction key for account determination
    Defines the type of automatic posting in question. These keys are defined in the system and cannot be changed.
    Use
    The transaction key documents the type of tax following transfer to General Ledger Accounting (FI-GL).
    The transaction key is used by the system to determine the tax accounts to be posted to automatically.
    Examples
    MWS is used for output tax.
    VST is used for input tax.
    RDW is used for rounding amounts when clearing in an alternative currency.
    BVR (formerly BUV) is used for company code clearing.
    SKT is used for cash discounts.

    Murtuza:
    Certain processes generate postings above and beyond the entered information, eg. cash discounts or rounding etc.  these internally generated items are posting relevant but were not entered by user/transaction.  in this way that flag identifies the cause for the posting.
    regards,
    bill.

  • A more successful experiment in creating compositable user interfaces for Config Dialogs

    A couple weeks ago I posted an experiment in creating compositable user interfaces using transparent subpanels. The approach might best be described as, "It at least was notable for being novel."
    Today, I'm posting another attempt, this one along more traditional lines, and far more successful. Particularly notable: this one can do all the arbitrary composition of the last one AND it solves the TAB order problem.
    This solution uses a picture control and renders N copies of a control. When the user tabs to a control or moves the mouse over the control, a real control slides into that position to be able to catch the events (update mouse over draw state, highlight for keyboard focus, handle typing, etc). When the Value Change occurs, a master array of data is updated and the picture control is updated.
    This is something that has been attempted in various forms in the past, but there are two aspects of this particular implementation that make it nice:
    its programmatic interface for specifying the behavior of the various objects should make it fairly easy for a user of the framework to programmatically generate their dialogs
    it handles the TAB problem without flickering, something I haven't seen in other attemps
    This idea spawns out of conversation about the previous experiment -- thanks to those of you who posted on various forums, e-mailed me, or, in a couple cases, showed up at my desk. That last one is not something I'm encouraging unless you work at NI... just saying. :-)
    Now, this experiement has already yeilded some interesting conversation. We note that as long as controls are instantiated independent of each other -- that is, no property of one control depends upon the property of another control -- this dialog system scales nicely. But in this experiment, I implemented Radio Buttons, which interact with each other -- when one is set True, the others go False. As soon as controls start interacting with each other (such as graying out one control when a checkbox is toggled, or having expandable sections, or really complex cases like updating a graph as some options change, like happens in some Express VI config dialogs) then we start needing ways to refer to the other controls. This rapidly moves us in one of two directions: naming controls or creating references. The naming approach is definitely my preference as it fits better with dataflow and I can do some interesting effects with breaking apart some of the tree. But all of this quickly starts sounding like "Please implement a XAML parser in LabVIEW." For those of you unfamiliar with XAML, in the world of UI design, it might very well be the coolest thing since sliced bread. A XAML string would indeed fit with dataflow, and we could start building that up. I hesitate to head down this road for two reasons. One, as many have noted, there's really not a good XML parsing library written in LabVIEW that can give me a useful DOM tree. Two, that's a huge project and my gut sense is that you'd have to complete a fairly large chunk of it before you'd start seeing any return on investment. But it is worth thinking about -- I might be wrong. Wouldn't be the first time. This code that I've posted today can at least get you started on the generation side if one of you decides to become industrious.
    I'm turning my attention away from this project for now... coding in G is lots of fun, and I wish I could spend more days doing it, but this has been a side project and it's time to get back to my assigned projects in text programming. Building a powerful platform for automatic UI generation in LabVIEW would be really useful -- I see lots of requests for this sort of thing, and other languages are pulling ahead of us in this domain.
    [UPDATE 5/17/2012 - There is an improved version.]
    Solved!
    Go to Solution.
    Attachments:
    ConfighThroughCtrlCreation.zip ‏558 KB

    Elijah K wrote:
    Thanks for posting this Aristos.  I would normally be one of those to go bug you at your desk, but in case I'm not the only one with this question... which particular flickering problem are you referring to?  The act of switching tabs?  In all honesty, I've never noticed...
    When you move controls around on the screen, normally you try to Defer Panel Updates while you do that. But Defer Panel Updates has an effect on control's abilities to catch certain mouse clicks, so when you're trying to move a control to catch the mouse, you have to work a lot without Defer Panel Updates, so if you're adjusting captions, etc, to match the new location, you can see flicker as properties adjust. You can move the control off-screen, as long as you have already updated the picture control to reflect the changes. It took a while to catch all the ways that the flickering can crop up. I think I got 'em all.
    Attached are the VIs saved for LV 2009. Actually, they're saved for LV 8.6, but it doesn't work in 8.6 because of a bug in the picture control that existed back then.
    Attachments:
    ComposableUI_LV2009.zip ‏391 KB

  • How to create a login interface in labview PDA module?

    How to create a login interface in labview PDA module? So that it checks with a list of usernames and passwords and allow to go to another VI?
    Anu

    Anu,
    I've attached a really short example that does something like what you're talking about.  It just compares the user's username and password a pre-determined username and password and then "logs the user in" based on that comparison.  Like Greycat said, you probably want to store this username and password info in some sort of file on the PDA that's in an encrypted format for both security and flexibility of your application.
    I hope this helps,
    Justin D.
    Applications Engineer
    National Instruments
    Attachments:
    LoginVI.vi ‏17 KB

  • I created a slide show on work computer. Placed photos and movies in Media Browser. Want to use another computer (laptop) to give presentation. Do I need to copy media browser to laptop or are pictures and movies embedded in slide show and can go anywhere

    I created a slide show on my work computer and placed many photos and movies in my work computer's Media Browser. Want to use another computer (laptop) to give the presentation and therefore change location of slide show. Do I need to copy the media browser to the laptop or once the pictures and movies are embedded in the original slide show, can I take it anywhere and not worry about the media browser?
    I also want to optimize a movie for Keynote, so it's not too large a file. Please help.

    Graphic, sound and video files are copied into the Keynote file, but make sure Keynote > Preferences - include sound and movies check box is ticked.
    If you have added additional fonts they will need be changed to reflect what is on the destination machine.
    If the other machine has a different Keynote version, ensure the same transitions and effects are available.

  • How do I create a slide show in a separate, non iPhoto folder?

    I moved about a 1000 photos from iPhoto to a new folder I created in an external drive to save space in iPhoto. How do I create a slide show in the new folder? When I click a photo to enlarge it it goes into Preview mode which enables you to have a slide show. But do I have to click and enlarge all 1000 photos? There is bound to be a simpler way.
    Thanks,
    Max

    MaxFS,
    I see you are still using Jaguar, is this true?
    With Tiger (10.4) you can select all the photos in a folder
    control click on the photos and scroll to "slideshow"
    You can also select all the photos in the folder
    double click on the selection to have them open in Preview
    In preview use the option for a slideshow.
    This does tell me that you might have a newer version of OS X than what is noted in your specs.
    Also, I think there is a limit to the number of photos that will open in a slideshow or preview. It might be around 99 or 150 (I can't remember right now)

  • [SOLVED] How to create a wlan0 interface?

    Hello:
    I'm getting a lot of problem with my wireless card, as you can see in this post (unsolved).
    I installed the supposedly driver for my wireless card without result. Installed "WICD" -installed networkmanager, but never achieved to initialize the GUI- and just see my wired connections, not the wireless, mine or from others.
    I'm just wondering if the problem is that I do not have a "wlan0" interface in my "/etc/rc.conf". If that  is true, could I create one by myself? In the wiki there are many pages (wireless setup, beginners guide, etc) that makes some dispersion in the information and it is difficult to me to follow -and evaluate- That's why I'm asking for your support.
    My actual rc.conf -selected parts- is -notice that because WICD there are some "!", as the wiki suggested -:
    # Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
    # Interfaces to start at boot-up (in this order)
    # Declare each interface then list in INTERFACES
    # - prefix an entry in INTERFACES with a ! to disable it
    # - no hyphens in your interface names - Bash doesn't like it
    # DHCP: Set your interface to "dhcp" (eth0="dhcp")
    # Wireless: See network profiles below
    #Static IP example
    #eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
    eth0="dhcp"
    INTERFACES=(!eth0)
    # DAEMONS
    # Daemons to start at boot-up (in this order)
    # - prefix a daemon with a ! to disable it
    # - prefix a daemon with a @ to start it up in the background
    DAEMONS=(syslog-ng dbus !network wicd netfs crond alsa hal sensors privoxy tor)
    ifconfig -a
    eth0 Link encap:Ethernet HWaddr 00:1E:33:FE:CA:04
    inet addr:192.168.1.6 Bcast:192.168.1.255 Mask:255.255.255.0
    inet6 addr: fe80::21e:33ff:fefe:ca04/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:1165 errors:0 dropped:0 overruns:0 frame:0
    TX packets:1091 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:849947 (830.0 Kb) TX bytes:132884 (129.7 Kb)
    Interrupt:44 Base address:0xe000
    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:14 errors:0 dropped:0 overruns:0 frame:0
    TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:700 (700.0 b) TX bytes:700 (700.0 b)
    iwconfig:
    lo no wireless extensions.
    eth0 no wireless extensions.
    Should I create a wlan0 interface? How?
    Thank you very much.
    PD: I also create a WPA profile in netcfg, following the wiki, but it is not working. I get:
    > Profile "mynetwork" does not exist (but I created it!!!)
    Last edited by gromlok (2010-10-16 03:13:59)

    [offTopic]
    I know this is not what you expect as a reply but anyway... I recently bought a very nice machine which is a Thinkpad x201i (the cheap version of the x201), great build quality, affordable price, perfect size and enough processing power. The problem is that it came with a realtek 8192se wireless card. It's everywhere on the internet: the driver sucks and it's only supplied by the vendor (so not in kernel tree, not even in staging). it costed me few bucks and 20 minutes of my time to replace it with an intel centrino advanced 6200N, I guess the Intel Centrino-N 1000 is even cheaper (saw it at less than USD15 on amazon). You'll get in-tree kernel drivers, injection support and all that fun stuff... I was happy to pay the extra money just thinking about the endless frustration I would have gotten with the realtek card. Not that compiling a driver makes me scared, but using a crappy driver is a pain.
    [/offTopic]
    Last edited by bangkok_manouel (2010-10-16 02:55:39)

  • WS endpoints restricition: What about java.util.Locale etc.?

    We have some problems with the restrictions for WS endpoints.
    Using SAPNW Developer Studio to create a web service including the virtual interface from a stateful session bean, we are not allowed to use usual types like java.util.Locale or java.util.Properties although they are serializable.
    This is also decribed in the SAPNW DS Help:
    "The following types are not allowed anywhere in the endpoint of a Web service:
    ·        Remote objects (EJBs)
    ·        Classes extending into another class and implementing an interface
    ·        Hashed table-like types
    ·        Classes/objects that cannot be serialized"
    So what is the preferred solution for this issue?
    Is there a way to use the serializable java.util.Locale type in a WS endpoint, or do we have to use its String representation?
    What is the preferred solution for hash-table types like Properties? And what about Interface types like Map?
    Maybe we just do not find the decisive documentation link?
    Thanks a lot,
    Dirk
    Edited by: Dirk Weigand on Nov 20, 2008 8:48 AM
    Moved to "Application Server - Java Programming"

    Question moved to "Java Programming"

Maybe you are looking for

  • Vertical scrolling in table

    Hello I have a table, and the user does not want to use the default buttons for navigation. Is it possible to attach a vertical scrolling for table? Thank you

  • Sum function not working properly in Crystal XI. Its showing total count of the values

    We have migrated one application from .net framework 1.0 to .net framework  2 (from Visual studio 2003 to Visual STUDIO 2005). Now after migration we are facing some problem related to the sum function in Crystal report 10. It is not working properly

  • ASM 11g Install not discovering all disks

    Doing an 11g ASM Installation, and not all raw disks are being offered as options when creating the ASM Disk Group. System details: 2xHP-UX (Itanium) servers, clustered, (Oracle Clusterware installed without error), including Raw devices being used f

  • "Error occurred in the data selection" on init delta load ODS- InfoCube

    Hi, gurus and experts! I'm trying to do Init delta load from 0FIAR_O03 ODS into 0FIAR_C03 InfoCube in PRD env. by InfoPackage "Initialize with delta transfer (with data transfer)". Immediately after the load was started I got error "Error occurred in

  • Camera on Nokia E6

    Hi All! Does anyone know how to turn off the camera tone on Nokia E6 cause after updating to Nokia Belle i don't know how to do it. Thank you in advance!