How Undo functionality can be Created for curves or Line in Swing?

Please Help! How Undo functionality can be Created for curves or Line in Swing GUI. In the Java Tutorial, Undo with Text is given. But on implementing the SIMILAR logic of Undo with Text, some Errors come with Undo is to be Created on Swing GUI on the Graphics.

What about storing the image before to execute the drawing method ? Undoing would be as easy as repainting the stored image ?

Similar Messages

  • How many SECONDARY INDEXES are created for CLUSTER TABLES?

    how many SECONDARY INDEXES are created for CLUSTER TABLES?
    please explain.

    There seems to be some kind of misunderstanding here. You cannot create a secondary index on a cluster table. A cluster table does not exist as a separate physical table in the database; it is part of a "physical cluster". In the case of BSEG for instance, the physical cluster is RFBLG. The only fields of the cluster table that also exist as fields of the physical cluster are the leading fields of the primary key. Taking again BSEG as the example, the primary key includes the fields MANDT, BUKRS, BELNR, GJAHR, BUZEI. If you look at the structure of the RFBLG table, you will see that it has primary key fields MANDT, BUKRS, BELNR, GJAHR, PAGENO. The first four fields are those that all cluster tables inside BSEG have in common. The fifth field, PAGENO, is a "technical" field giving the sequence number of the current record in the series of cluster records sharing the same primary key.
    All the "functional" fields of the cluster table (for BSEG this is field BUZEI and everything beyond that) exist only inside a raw binary object. The database does not know about these fields, it only sees the raw object (the field VARDATA of the physical cluster). Since the field does not exist in the database, it is impossible to create a secondary index on it. If you try to create a secondary index on a cluster table in transaction SE11, you will therefore rightly get the error "Index maintenance only possible for transparent tables".
    Theoretically you could get around this by converting the cluster table to a transparent table. You can do this in the SAP dictionary. However, in practice this is almost never a good solution. The table becomes much larger (clusters are compressed) and you lose the advantage that related records are stored close to each other (the main reason for having cluster tables in the first place). Apart from the performance and disk space hit, converting a big cluster table like BSEG to transparent would take extremely long.
    In cases where "indexing" of fields of a cluster table is worthwhile, SAP has constructed "indexing tables" around the cluster. For example, around BSEG there are transparent tables like BSIS, BSAS, etc. Other clusters normally do not have this, but that simply means there is no reason for having it. I have worked with the SAP dictionary for over 12 years and I have never met a single case where it was necessary to convert a cluster to transparent.
    If you try to select on specific values of a non-transparent field in a cluster without also specifying selections for the primary key, then the database will have to do a serial read of the whole physical cluster (and the ABAP DB interface will have to decompress every single record to extract the fields). The performance of that is monstrous -- maybe that was the reason of your question. However, the solution then is (in the case of BSEG) to query via one of the index tables (where you are free to create secondary indexes since those tables are transparent).

  • How many heirachies can be created using one dimensional table

    Hi,
    I have one dimension table and one fact table, how many heirachies can be created, is it only one?
    Thank you.

    Hi,
    One dimension can have only one hierrarchy for sure.But create dimension in a such a way(columns should be included in one dimension,example: Year and FYear in Time Dimension) that we can create two branches on Total level.
    Refer this blog..Will solve your doubt....http://gerardnico.com/wiki/dat/obiee/hierarchy#defining_multiple_hierarchies_for_the_same_dimension_logical_table
    Regards,
    Srikanth
    http://bintelligencegroup.wordpress.com

  • Tolerances & simulation can be created for what purchasing documents?

    hi friends
    Tolerances & simulation can be created for what purchasing documents
    Regards
    Vinny

    SRM supports this functionality for Confirmation & Invoices.
    Regards
    Kathirvel

  • How may implementations can we have for a BaDI?

    How may implementations can we have for a BaDI?

    if BADI check Multi-USE , then u can
    Multiple-Use Business Add-Ins
    You can differentiate between single-use and multiple use Business Add-Ins. The distinction is based on the procedure or event character of an enhancement. In the first case, the program waits for the enhancement to return something, usually a return code. A typical example could be a benefit calculation in HR. Depending on the implementation, alternative calculations can be executed. With multiple use add-ins, an event that may be of interest to other components is processed in program flow. Any number of components could use this event as a “hook” to hang their own additional actions on to.
    In addition to importing parameters, you can also use changing parameters for multiple-use Business Add-Ins. There is no sequence control for multiple-use implementations of BadIs. Therefore, using changing parameters can cause problems. There is no guarantee that implementations will not overwrite the results of previous implementations. Sequence control is technically impossible, since at the time of the definition the interface does not know which implementations there will be and which parameters will be changed by implementations. It is not possible to have a decision as to which implementation should be executed before which other (future) implementation.
    Example:
    In a particular application, you want to be able to continue processing indexes after another component has saved data (in other words, the system should allow you to use an add-in after saving). Since this point in time can be useful for different purposes, you can create an enhancement here that can be used by multiple subscribers.
    To create a multiple-use Business Add-In, proceed as follows:
           1.      Define an add-in and select the Multiple Use checkbox from the Administration tab.
           2.      Define an interface with the method OBJECT_SAVED'and the importing parameter OBJECTNAME.
    Calling your enhancement in the application program:
    program event.
    data exit_obj type ref to if_ex_event.
    call method cl_exithandler =>get_instance
         changing instance = exit.
    form save_object using obj_name type c.
    update …
    call method exit_obj->object_saved
         exporting objectname = obj_name.
    endform.
    For the caller it is irrelevant whether (and how many) subscribers use the event as a starting point for further actions. The active implementations are called in the adapter method.
    more in http://help.sap.com/saphelp_nw04/helpdata/en/ee/a1d548892b11d295d60000e82de14a/content.htm
    Regards
    Prabhu

  • How many tables can be created under one user's account?

    Hi everyone,
    I am a newer, I was wondering how many tables can be created under one user's account? Is there a number of tables limitation for the whole system?
    Thanks
    Jun Chen

    The answer is that Oracle imposes no limit on the number of tables that can be created in a single schema. Whatever limits exist are imposed by the hardware and kernel resource limits of a given configuration.
    Russ

  • How many devices can you use for your itunes account?

    how many devices can you use for your itunes account?

    PT wrote:
    Macistotle wrote:
    Unless you have DRM still haunting your tunes ... Then you can only use those songs on 5 devices. Otherwise, connect as many as you like (as stated above).
    No, you can sync your DRM tracks to an unlimited number of iPods (but only authorized to play on 5 different computers/user accounts)
    Patrick
    So I can sync two iPods to my iTunes account and sync the same digital copy movies that come with some o' my DVDs to both ipods? Do movies make a difference really, DRM-Wise? Thanks in advance.

  • How many vlan can be created on single port of HWIC-2FE

    Hi Guys,
    I have a router 1921 with a HWIC-2FE.
    How many VLAN can I create in each port of HWIC-2FE.  
    Thank you
    Salvo

    I'm not sure what you are referring to. How many VLANs can be untagged while the port is in access? Or how many VLANs can you pass on a trunk?

  • How many implimentations can be done for a single BADI definition?

    How many implimentations can be done for a single BADI definition?
    Is there any restriction to impliment a single BADI definition?
    Plz answer with proper explanation....
    Thank you in advance
    REgards,
    Chaitanya

    hi Krishna Chaitanya,
    In a badi if the "Multiple Use" Checkbox is checked then You can have any number of Implementations for the BADI
    Say I have defined a BADI "BADI1"
    and I have 3 implementations
    IMP1
    IMP2
    IMP3
    The order of execution will be IMP1, IMP2 and IMP3
    In a badi if the  "Multiple Use" Checkbox is not checked then You can have ONLY ONE  Implementation for the BADI
    Say I have defined a BADI "BADI1"
    and I have 3 implementations
    IMP1
    IMP2
    IMP3
    Only one Implementation can be active at a time and only that will get executed
    Hope this helps a bit
    Reward if Useful
    Cheers
    Kripa Rangachari.

  • No data media can be created for the proposal run - Bacs Payment

    Hi,
    When i schedule program RFFOGB_T for bacs payment and select proposal run only i get the following error "No data media can be created for the proposal run". But when i execute the program with out selecting the check box " Proposal run only...a file was getting generated...Could any onle pls help me resolve this problem.
    With Best Regards,
    M.Naveen Kumar

    The post has been answered

  • How does the icon get created for a saved file

    In my program I allow saving files using JFileChooser and ActionListener.
    In the constructor of the main class which extends JFrame I also set an icon by saying:
    this.setIconImage(new ImageIcon("image.jpg").getImage());
    This does not only set an icon on the title bar and the minimized window, it also creates an icon on my saved files. However, the image quality for the icon on my saved files is bad, even though the image quality for the other icons is ok. The size of the icon image I am providing is close to the size of the icon image on my saved files.
    How did the icon get created for my saved files? Is it possible to improve the image quality?
    Thanks for looking at this!

    I just realized that
    this.setIconImage(new ImageIcon("image.jpg").getImage())
    did not create the icon for my saved files.
    So what did create it? I did not program it!
    However, I happen to have an icon file Ananya.ico where I have my java project. I use if for my installation file. Did Java use this icon?
    Please help! Thanks!

  • [svn:fx-4.0.0] 13527: changed how the mpl package is created for easier maintainability.

    Revision: 13527
    Revision: 13527
    Author:   [email protected]
    Date:     2010-01-15 10:59:08 -0800 (Fri, 15 Jan 2010)
    Log Message:
    changed how the mpl package is created for easier maintainability.  Previously I had been duplicating what the main pkg target was doing and just omitting the files that were not intended to be in the mpl pkg.  After the main pkg is bundled up the files not needed will be removed from the stage directory and then bundled up as the mpl package. fixes SDK-25039
    Straighten out the confusing packaging targets. 
    -sdk-packages is now packages -> calling this will package the flex_sdk_4 and mpl zips
    QE notes: the mpl + add-on package should give us the flex_sdk_4 pkg
    Doc notes:
    Bugs: SDK-25039
    Reviewer:
    Tests run: packaging targets
    Is noteworthy for integration: no
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-25039
        http://bugs.adobe.com/jira/browse/SDK-25039
    Modified Paths:
        flex/sdk/branches/4.0.0/build.xml

    Hi Harshall,
    You have to enter the value as 1 in Installed base field and then press enter.
    You will be taken inside and then you will be able to see the Goto - Partner screen.
    Hope this will help.
    Please reward points suitably.
    Regards,
    Naresh.

  • How many statements can be created with one connection?

    how many statements can be created with one connection?

    and on available memory. At some point, even were the database to allow an infinite number, you'd run out of memory.

  • How Many WebSItes can I create

    I already created a web site but I´d like to create a new one. Is this possible without erasing the first one? How many sites can I create?

    Welcome to the Apple Discussions. Yes. Create a new site in iWeb and rename it to whatever works best. When you publish the URL will be: http://web.me.com/YourMMe_Account_Name/SiteName/
    You can have as many sites as you have room form. I have over 85 individual sites in my MMe account.
    OT

  • How many responses can i generate for an unpaid form?

    How many responses can i generate for an unpaid form?

    Free accounts allow you to collect 50 responses before you have to export to make room for more.
    Andrew

Maybe you are looking for