Legal issues against tweaking Swing sources?

Hello,
I needed in my application a TableCellRenderer which would behave exactly like a default one, except it would cut out the left part of the text when it is too long to fit into table cell (that is, it would transform, say, "something here" to "...ing here" instead of "somethin...")
I looked at DefaultTableCellRenderer, but found no method which would satisfy my needs. So there was nothing to it but to write a custom renderer. But how? Further investingation showed that Swing uses the method javax.swing.SwingUtilities.layoutCompoundLabel internally to create the abbreviation at need. So, I grabbed Swing sources which come bundled with the SDK, took the code of that method along with some others (if it were only possible to avoid copy-pasting...), reworked slightly to fit my needs and packed into a neat subclass.
It does work. But my question is: are there any legal issues regarding this approach? What, if anything, must I do to be fair with the license? Or is it not possible at all?
The application is a non-commercial (although I do get paid for it), scientific project which is not currently GPL'ed, but may become so in the future.
Sincerely,
Daniel Janus

Are you sure you want to do that. If you do something like that, then when you distribute your application, your clients will have to have your version of the code. And, what about when sun upgrades the class you are modifying. You would have to modify the new one if it still behaved the sameway. What a maintainable nightmare.
Personally, I normally write my own JTable and TableModel as well as my own editors and renderers. I think I use the default cell renderer for String data types though. I don't remember ever seeing it display in the manner you describe. You could always increase the cell size if you want. Just for fun's sake, let me give you an example of a CellRenderer:package some.package.name;
import javax.swing.table.*;
import javax.swing.*;
import java.text.*;
import java.awt.*;
import java.util.*;
import java.io.Serializable;
* The cell renderer for Date and DateTime data types.
* Used to display formatted Date data.  Must be registered with
* a particular table.  Use the following code to do this.<BR><BR>
* <code>table.setDefaultRenderer(Date.class, new SomeDateRenderer());</code>
* from within your JTable.
* @author your name here
public class SomeDateRenderer extends DefaultTableCellRenderer implements Serializable {
     * Default Date Format String for formatting dates in this renderer.
     public static final String DATE_FORMAT_STR = "MM/dd/yyyy";
     * Default Time Format String for formatting times in this renderer.
     public static final String TIME_FORMAT_STR = "HH:mm";
     * Default DateTime Format String for formatting dates in this renderer.
     public static final String DATETIME_FORMAT_STR = DATE_FORMAT_STR+" "+TIME_FORMAT_STR;
     * Constructor.
   public SomeDateRenderer() {
          super();
          setHorizontalAlignment(SwingConstants.CENTER);
     }//end constructor
     * (override) Standard getTableCellRendererComponent.
     public Component getTableCellRendererComponent(JTable table, Object value,
               boolean isSelected, boolean hasFocus, int row, int column) {
        super.getTableCellRendererComponent(table,value,isSelected,hasFocus,row,column);
      if (value != null && !value.equals("")) {
         String formatStr = null;
         if (value instanceof java.util.Date) {
            setText(new SimpleDateFormat(DATE_FORMAT_STR).format(value));                    
         } else if (value instanceof java.sql.Time) {
            setText(new SimpleDateFormat(TIME_FORMAT_STR).format(value));
         } else if (value instanceof java.sql.Timestamp) {
            setText(new SimpleDateFormat(DATETIME_FORMAT_STR).format(value));               
      } else {
         setValue(value);
        return this;
   }//end getTableCellRendererComponent method
}//end SomeDateRendererAnyways, you can write a renderer to be anything you want. This is just a rudimentary example. I hope it helps.

Similar Messages

  • Are there any legal issues against sharing a single Adobe Creative Cloud username and password among other coworkers for work related projects?

    A coworker of mine shared his Adobe Creative Cloud password and username with me so that I could download Adobe Premiere onto my own work computer to do some video editing projects. Before, I download this onto my computer, I want to make sure there are no legal problems in doing this.

    I don't think that is allowed... "A" is allowed 2 activations Cloud License allows 2 activations http://www.adobe.com/legal/licenses-terms.html
    I don't think you as "B" are allowed to use A's account

  • Dump while doing goods issue against order with movement type 261

    Hi Team,
    We are integrating Asset management process along with the goods issue against the order which is created with a business partner for movement type 261.
    when we try to complete the process the system gives us a dump as described below.
    please look through the dump and advice for the same.
    Short text
        The current application triggered a termination with a short dump.
    What happened?
        The current application program detected a situation which really
        should not occur. Therefore, a termination with a short dump was
        triggered on purpose by the key word MESSAGE (type X).
    Error analysis
        Short text of error message:
        System error in the FI/CO interface
        Long text of error message:
         Diagnosis
             Updating of the FI/CO interface was called with object type "MKPF"
             yet the checks were run for object type "AMBU".
         System Response
             Checking and updating must be for the same object type.
         Procedure
             It has to do with a system error from the calling applications.
        Technical information about the message:
        Message class....... "RW"
        Number.............. 103
        Variable 1.......... "MKPF"
        Variable 2.......... "AMBU"
       Variable 3.......... " "
       Variable 4.......... " "
    rigger Location of Runtime Error
       Program                                 SAPLMBWL
       Include                                 LMBWLU21
       Row                                     62
       Module type                             (FUNCTION)
       Module Name                             MB_POST_GOODS_MOVEMENT
    46    IF xmkpf-xabln IS INITIAL.                               "note 434093
    47        CALL FUNCTION 'MB_XAB_NUMBER_GET'.                   "note 434093
    48    ENDIF.                                                   "note 434093
    49
    50 ENHANCEMENT-POINT MB_POST_GOODS_MOVEMENTS_01 SPOTS ES_SAPLMBWL STATIC.
    51
    52 ENHANCEMENT-POINT MB_POST_GOODS_MOVEMENTS_02 SPOTS ES_SAPLMBWL.
    53    CALL FUNCTION 'MB_CREATE_MATERIAL_DOCUMENT_UT'
    54         EXCEPTIONS
    55           error_message = 4.
    56 *  As soon as we have started to put things into UPDATE TASK, we must
    57 *  ensure that errors definitely terminate the transaction.
    58 *  MESSAGE A is not sufficient because it can be catched from
    59 *  external callers which COMMIT WORK afterwards, resulting in
    60 *  incomplete updates. Read note 385830 for the full story.
    61    IF NOT sy-subrc IS INITIAL.
    >>>       MESSAGE ID sy-msgid TYPE x NUMBER sy-msgno WITH            "385830
    63                  sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    64 *     MESSAGE A263.
    65    ENDIF.
    66 * Optische Archivierung
    67 * Spaete Erfassung mit Barcode
    68 * Redesign of barcode handling -> note 780365
    69   PERFORM barcode_update(sapmm07m) USING xmkpf-mblnr
    70                                          xmkpf-mjahr
    71                                          barcode.
    72
    73   MOVE-CORRESPONDING xmkpf TO emkpf.
    74   CALL FUNCTION 'MB_MOVEMENTS_REFRESH'
    75     EXCEPTIONS
    76       error_message = 4.
    77    MOVE-CORRESPONDING xmkpf TO emkpf.
    ource Code Extract
    ine  SourceCde
      32 *    BKPF as well. There is no other way to forward XBLNR to FI as not
      33 *    every document is posted by MB_CREATE -> a new function module in
      34 *    MBWL for transferring the information, called by FI, meant to load
      35 *    the complete function group for all MBxx postings when this isn't
      36 *    required (Performance). Would be the better way to transport the
      37 *    information after switching off MBxx in later release.
      38 *    corresponding IMPORT ... FROM MEMORY ... can be found in
      39 *    AC_DOCUMENT_POST (FORM FI_DOCUMENT_PREPARE (LFACIF5D))
      40      l_mem_id = 'MKPF-XBLNR'.                                   " 641365
      41      EXPORT xblnr = xblnr_sd TO MEMORY ID l_mem_id.             " 641365
      42    ELSE.                                                        "1245374
      43      l_mem_id = 'MKPF-XBLNR'.                                   "1245374
      44      FREE MEMORY ID l_mem_id.                                   "1245374
      45    ENDIF.

    Couple of notes are mentioned (385830, 780365 etc) and check whether these notes are applied.  If so, check with the ABAPer and go through the source code corrections explained in the respective notes.
    You may also go through the following notes
    1)  Note 386656 - FBV4: RW103 'System error in the FI/CO interface'
    2)  Note 388316 - RW103 "System error in the FI/CO interface"
    3) Note 543463 - Inconsistent Posting in budgetary ledger and/or RW102/RW103
    thanks
    G. Lakshmipathi

  • MM COnsigment stock: Unable to issue against reversation

    dear all ,
    we are trying to prototype a MM consigment stock process.
    we have done the following
    1. Purchase info record is created as consigment
    2. PO is created. while creating the PO, the net price is coming as Zero.
    3. Migo was possble with item category as K and movement type as 101
    4. Created a reversation
    5. finally tried to do a goods issue with special indicator as K
    we are getting error PO has zero price.
    we have tried all known settings and the net price in PO  is still coming as zero.
    kindly let us know where the issue could be . what setting need to be modified.
    regards

    Dear Friend,
    when the matl is in consignment sstores, it is not belongs to company. Vendor is the legal owner of the matls.
    you have to transfer from consignment stores to  company stock using 411-K mvt type( T-code= MB1B).
    *you can not do two transactions at single shot( i.e. both transfer posting and issue a matl against Resevastion)*
    In ur case upto 3rd step is OK.
    then,
    1.0 Transfer the matl to companys stock.
    2.0 Create a reservation against a cost center.
    3.0 issue a matl against ur reservation.
    OR
    **u can issue a matl directly to cost center using mvt 201-K in T- code= MB1A.**
    *By that time if u see the matl do. u wil see that stock changes from 101(K-) to 201(K+), but can not issue against reservation*
    It will solve ur problem.
    If u have any doubts, plse revert back.
    Reward if useful.
    Regards
    Viru

  • Legal issues with distributing Captivate projects

    Are there any legal issues to consider is for example a
    tutorial is created with Captivate and then that tutorial is sold
    and distributed via Web and CD?

    Hi niatross and welcome to our community!
    If you are referring to anything "Legal" wise with regards to
    what you produce using Captivate, there is nothing you have to do
    as far as Adobe is concerned. They supply you the software and you
    are totally free to do what you want with the output from that
    software.
    However, you could run up against a possible legal issue if
    perhaps you used Captivate to record something that was copyrighted
    and distributed that.
    Make sense? I hope so.
    Cheers... Rick

  • Report for Material Issued against Service Orders But not Billed.

    Hi Experts,
    For CRM Service Orders Based on the Reservation number generated in CRM we will make the Goods issue document in ECC.
    My Question In CRM Do we have any standard report to see Material issued against CRM Service orders but not billed. i.e. Work in progress.
    Thanks in Advance,
    Abhinesh

    Hi Vivek,
    What I wanted to say that you won't get information from VAV about billing since as far as I know it doesn't contain any relevant table.
    You should try create a query using LIKP-LIPS-(joint type: left outer)-VBRK. This will connect deliveries to billing document, you can also get SO number. Please try this.
    (Sorrowully I don't know which logical database would be good for you)
    BR
    Csaba

  • PO number and material issued against this PO for subcontracting

    How to know the link in between the PO number and material issued against this PO for subcontracting.
    I have checked that PO history is not getting updated.
    Thanks,

    Hi,
    We have 2 different scenarios where you can post a goods issue to Subcontract Venodrs.
    Scenarios 1: You can post the goods issue against a subcontrac vendor with out referencing the Subcon PO from ME2O, at this stage we will be knowing what is the stock at subcontract vendor but we will not be knowing the issues against which and how much Quantities are posted.
    So when we are post goods receipt, then we will come to know the consuption quantities.
    Scenario: 2, If we use the delivery concept then we can track the goods issues against the subcon POs.
    If you really keen to track the material issued to Subcon vendor against a PO so better use with delivery.
    Thansk,
    Satya.

  • Posting multiple goods issues against the same delivery

    Hello gurus,
    We are a fashion apparel company using ECC 6.0 and would like to know if it is possible to post mutliple goods issues against the same delivery?
    I will explain the business requirement.
    - We create a stock transport order to deliver 400 units of merchandise to on or our retail stores (STO is created and processed to a delivery).
    - This information is passed down to our warehouse management system (which is not SAP)
    - Our warehouse management system has the ability to split a delivery into multiple shipment when needed.  For example, our warehouse may only be able to complete 250 units for our morning shipment and will therefore pick, pack and post this.  This will feed back into SAP and process a 641 movement so that the units now show as "in transit".  This is needed so that our stores can process the ASN and move the units into their inventory when they receive the merchandise later that day.
    - During the afternoon, our warehouse will process the remaining 150 units and will ship this to our store later in the evening or next day.
    Currently, we are not able to process another goods issue against a delivery as we close out the delivery during the first goods issue.  We would prefer not to have to generate a new delivery for our DC and let them continue to process against the same delivery, but we are unsure how to configure this.
    Any help or guideance would be extremely appreciated
    Thanks in advance

    Hi RJ,
    First of all sorry to write such a lengthy reply,In one line if i want to summerize then it is not possible with standard SAP however we can achieve this by writing some piece of code in both the system
    AS - IS
                   Business process
              From business process point of view you are right that once the pick & pack is in process it is not advisable to create a new delivery document for balance quantity and share the same with WMS as then they have to create a new document in WMS and start picking based on that rather then the old delivery document number. if i am in your position then i can give a thought like this
    e.g.
    Delivery                                                  - 100 Unit
    Shipment confirmation from WMS            -   60 Unit
    Change in delievry quanity / Pick qty        -   60 Unit
    Invoice from SAP                                    -   60 Unit
    Second confirmation from WMS                          -   40  Unit
    Change in the existing delivery quantity                -   Now here we have two option either
    1) Change the delivery quantity / Pick qty  to (60+40) =100 or
    2) Remove the 60 and update 40 as delivery and pick quantity
    Pros & Cons
    if you will select option 1 then furhter invoice will happen for 100 unit which is incorrect as physically you are shipping only 40 unit
    if you are selecting option 2 then the document flow is incorrect as you don't have history(in SAP) for the 60 unit which was shipped earlier
    Solution ::
    so in my opinion the best option is to create a seperate delivery document (store the old delviery number in one of the field of the new delivery and pass the same to custom segment of the IDoc) transmit the IDoc to WMS write the validation logic in WMS
    Find the record with old deliver number in the WMS system, check the status whether it is active or inactive
    if it is acitive Validate the Material + qty with the WMS record(Material + balance quantity) if both are same then pass the new deliery number to custom field of the WMS table
    At the time of confirming back to the SAP, Write a piece of code in SAP that if the incoming idoc custom field(new delivery number) field is populated then ignore the orignal document number and post the document using the new delivery document number
    Hope this help

  • Post a good issue against an outbound delivery with movement type 601 K

    Hello,
    according to my business scenario I need to manage the stock of different vendors into the client's location (plant) at storage location level and I need to post the good issue against an outbound delivery to decrease the stock level.
    Since the owner of the goods isn't my client the item is managed only at quantity level (not value) so I'm not interesed in the accounting document.
    To do it I'm using the functionality related to the vendor consignment stock but I'm not able to post the good issue against an outbound delivery using the movemement type 601 and the special stock indicator equal to K.
    In particular I've tried in two different ways:
    - setup the consignment stock indicator (= K) into the sales item category, but when I post the goods issue the system is not able to find out the right vendor
    - to create a stock determination rule instead of the setting previous described, but the system display an error message (Fld selectn for mvmt type 601 / acct L534200770 differs for Cost center (010) ) even if the accouting is not relevant in my scenario
    Can you suggest me how the system has to be setup in order to cover my requirements?
    Thanks in advance,
    Alessandro

    Hi,
    Please clarrify which material type you are using in this scenario? I suggest you to use material type UNBW (no value updation will be there) and create a material master.  Use special stock indicator K. Proceed with 601K to do GI. Hope it works. Thanking you.

  • POST GOODS ISSUE AGAINST RESERVATIONS

    Dear All,
    I want to restrict the goods issue against the manual reservations.
    Logic:At the time of goods issue against the reservation system should check stock in hand(unrestricted stock)-all previous reservations.
    Eg:suppose unrestricted stock is 50kg
    Reservation 1 for 20 kg
    Reservation 2 for 30 kg
    Reservation 3 for 40 kg
    Reservation 4 for 10 kg
    When i do goods issue for Res :3
    System should check Uns Stock(50kg)-Previous Res(20kg+30kg)
    give error message stock insufficient.
    Waiting for the expert comment.
    Kind Regards,
    Sankar T

    Hi
       Let me tell you with that logic reservation works.
    While creating manual reservation, system checks whether material is available on specified date or not. In case material is available then system will allow to reserve the material otherwise not.
        Now take your case, if you have made following reservations
    1) 20 Kg
    2) 30 Kg
    3) 40 Kg
    4) 10 Kg
    This means against each reservation material will always be available for particular reservation (because no one can issue particular material by any other means)
    Now suppose in unrestricted use 50 kg of material is available and you want to issue the material against reservation No 3 then system will issue material from reserved material (Not from the un restricted use)
       This means the logic which you want to use is already applied by SAP in one step before (while creating reservation) so need not to apply same logic once again.
       and if you still want to use this logic , you take a help of ABAPer , he only can help you in this mater
    Reward if helpful

  • Goods Issue against outbound delivery from blocked stock

    Dear All
    I want to do goods issue against outbound delivery created without any reference from blocked stock of my storage location. Is there any way I can achieve this? I know normally SAP allows goods issue from unrestricted stock but my business scenario requires goods issue to be done from blocked stock against outbound delivery.
    Please let me know any solution for this.
    Thanks and Regards
    Satish Kumar

    Hi
    Check this link where similar issue has discussed and its resolved as well. Please try this and update the findings. If possible could you share the background of this strange requirement.
    http://scn.sap.com/thread/1541911
    Thank$

  • Account Detrmination for Goods Issue against Order

    Dear All,
    We have a requirement where goods issued against reservation created through plant maintenance order should hit repairs & maintenance account instead of default account such as consumption stores and spares.
    Can any changes be made in configuration so that the default account can be changed either while saving plant maintenance order or can the default be overwritten when material is issued through MB1A against reservation.
    Useful answers will be rewarded with points
    Regards
    Milind Nair

    Dear
    Your knowldge iam adding the points
    In materail master check the Valuation class 4 digits (ex: 2010)
    is assigned in material master . The same material will be used in many places , this valaution class depends Production created by Fi.
    This same will have assigned in G/L at OBYC t code. Here we assign as automatic posting. The same G/l account has given as automatic posting in G/L t code FS00.
    In obyc has many process example for goods issue it will come as BSX. costing difference PRD.
    your materails type is ERSA these types may bes used many plcaes other than Pm . If clinet interests you can assign valuation class with seperate G/l account for PM
    All the G/L , costing docuemnts will appear while doing migo (mb1a) 261 movements as per your obyc seetings
    Tell requirements with FI/MM

  • Issue with Pro Res sources when encoding in Media Encoder.

    There seems to be a big issue with Pro Res sources in Media Encoder. I've noticed that when exporting using the 'software only' mode my graphics and titles look horrible, they are pixelated around the edges and the compression looks bad. This issue only happens when it's being made from a Pro Res source, if I make the exact same file Uncompressed this issue is resolved. If I use the 'Cuda' option (which I already know is the better option) this issue is resolved. The thing is, in a work environment not all of our systems are Cuda enabled and I would like to use Media Encoder as a exporting option overall. I love Media Encoder, it's fast and easy to use but this Pro Res issue is huge because the majority of the time we are working in Pro Res. I also did a test out of Avid Media Composer to Media Encoder, I sent a reference file referencing the Avid MXF material and the issue is gone, this seems to my knowledge to be a Pro Res only issue. The settings I am exporting to is 960 x 540 h.264 and also .mp4. This is coming from a 1080p source and yes I do have the 'maximum render quality' checked for best scaling. I understand that Software only vs Cuda and Open CL use different algorithms when scaling but this seems crazy to me that it would look  this much worse.
    Anyways if somebody can please look into this that would be great, this seems to be an issue where I can't continue at this moment to use Media Encoder. Making my source files Uncompressed every time to do an export is just not a real workflow I want to do.
    On a side note I've also recently noticed on a clip that had text over a grey background that there are lines going all down the screen evenly when exporting to even a non scaled 1080p .mp4. Once again, this issue goes away with any format but Pro Res. The weird part is this happens even with Cuda enabled. This is why I am thinking Media Encoder is having some sort of issue with the Pro Res codec.
    I am on a current new 27'' fully loaded iMac with the latest Adobe CC updates.
    Has anyone else experienced this?
    thank you

    No, it is why advance users do not use the wizard.
    Have a look at OpenOffice.org and its form creation. Once you add your fields in OpenOffice.org, just export to PDF and the form fields will be named just like you named in them in OpenOffice.org and the drop down values carry over.

  • ABC Analysis of Planned Consumption(Issue against Reservation).

    Hi Experts,
    Is there any standard report is available for ABC Analysis of Planned Consumption(material issued against Reservation)?
    thx in advance...

    Hi,
    I allready tested with Tcodes such as MC.9 (gives details of total & unplanned consump. not for Planned consump.) & MB51(gives details for only one Mov. Type say either 261 or 262 not possible to do ABC ana. for balance of both)
    Is there any other std report as ABC analysis of planned consp.
    Thx in advance...

  • I want to put a Firefox link in a Freeware section of my website, is there any legal issue?

    Godd afternoon,
    I have a comapny website and we are making a freeware software section.
    I want to put a Firefox link there (http://www.cloudinfo.pt), is there any legal issue?
    Can I host the package or just insert the link?
    Thanks.
    Fernando

    hello Fernando, there shouldn't be any issue with that, but for details please refer to Mozilla's trademark policy at https://www.mozilla.org/en-US/foundation/trademarks/policy/ - especially the part about software distribution & linking.

Maybe you are looking for