How to add string in editable datagrid

Hai
       I have attached the mxml below.
   I need to add ' ' before and after the value.
   1. here i have the mxml, run the mxml , enter some vlaue in textbox and click add button, now the values will be added
   2. u can see the value in single quotes ie. ' '
   3. now u click the Value column  u can edit the value, after editing the value will not be in ' '
   4. here i have a problem, if the value is not in ' ' , i cant submit that query.
   5. how can i add ' ' after editing .
can any one help me
Thanks in Advance : )
<mx:Application 
xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
>
<mx:Script>
<![CDATA[
// ActionScript fileimport  
mx.rpc.events.FaultEvent;
import  
mx.controls.Alert; 
importmx.managers.CursorManager;
import  
mx.collections.ArrayCollection;[
Bindable]
public var adhoc:ArrayCollection = newArrayCollection();[
Bindable] 
public var serverString = "";
private function initImage(event:MouseEvent):void{
if(adhoc.length > 0){
private function onChange():void{
if(comboBox.selectedIndex == 0){
else{
private function onChange1():void{
if(combo2.selectedItem == "DATEDEPLOYED" || combo2.selectedItem == "DATEUPLOADED"){datepick.visible =
truetxt.visible =
false}
else{txt.visible =
truedatepick.visible =
false
private function add():void{
varstr:String = txt.text; 
if(str.length == 0 && txt.visible == true){Alert.show(
"Value Can Not Be Empty"); 
return;
if(combo2.selectedItem != "DATEDEPLOYED" || combo2.selectedItem != "DATEUPLOADED"){
if(txt.visible == true){ 
var temp:Object = newObject();
"'"+txt.text+"'";
varstr1:String = datepick.text; 
if(comboBox.selectedIndex == 1){ 
if(combo2.selectedItem == "DATEDEPLOYED" || combo2.selectedItem == "DATEUPLOADED"){ 
if(str1.length == 0 && datepick.visible == true){Alert.show(
"Date Cannot Be Empty");}
else{ 
var temp:Object = newObject();
false;addopenbracket.enabled =
false;combo2.enabled =
false;combo1.enabled =
false;
private function querydelete():void{
if(AdHoc.selectedIndex > 0) { 
if(AdHoc.selectedIndex == (adhoc.length-1)){adhoc[AdHoc.selectedIndex-1].cond =
""; addopenbracket.enabled =
false;addclosebracket.enabled =
false;addbutton.enabled =
false;combo2.enabled =
false;combo1.enabled =
false;
// adhocdetailgridcompilance.dataProvider = null ; 
// adhocdetailgrid.dataProvider = null ;
else if(adhoc.length == 1) {
// adhocdetailgridcompilance.dataProvider = null ; 
// adhocdetailgrid.dataProvider = null ;addopenbracket.enabled =
true;addclosebracket.enabled =
true;addbutton.enabled =
true;combo2.enabled =
true;combo1.enabled =
true;}
else{Alert.show(
"Select The Rows To Delete");
private function andSubmit():void{
for each(var obj:Object inadhoc){ 
if(obj.fname == combo2.selectedItem && obj.opera == combo1.selectedItem){ 
if(combo2.selectedItem != "DATEDEPLOYED" || combo2.selectedItem != "DATEUPLOADED"){ 
if(txt.visible == true){ 
trace("2 equals"); 
var temp:Object = newObject();
else{ 
trace(obj.fname + ":"+ combo2.selectedItem);  
trace(obj.opera + ":"+ combo1.selectedItem); 
trace(obj.val + ":" + "'"+txt.text+"'");
else if(obj.fname == addclosebracket.label){ 
if(combo2.selectedItem != "DATEDEPLOYED" || combo2.selectedItem != "DATEUPLOADED"){ 
if(txt.visible == true){ 
trace("2 equals"); 
var temp:Object = newObject();
else{ 
trace(obj.fname + ":"+ combo2.selectedItem);  
trace(obj.opera + ":"+ combo1.selectedItem); 
trace(obj.val + ":" + "'"+txt.text+"'");
if(obj.fname == combo2.selectedItem && obj.opera == combo1.selectedItem){ 
if(combo2.selectedItem == "DATEDEPLOYED" || combo2.selectedItem == "DATEUPLOADED"){ 
if(datepick.visible == true){ 
trace("2 equals"); 
var temp:Object = newObject();
else{ 
trace(obj.fname + ":"+ combo2.selectedItem);  
trace(obj.opera + ":"+ combo1.selectedItem); 
trace(obj.val + ":"+ datepick.text);
else if(obj.fname == addclosebracket.label){ 
if(combo2.selectedItem == "DATEDEPLOYED" || combo2.selectedItem == "DATEUPLOADED"){ 
if(txt.visible == true){ 
trace("2 equals"); 
var temp:Object = newObject();
else{ 
trace(obj.fname + ":"+ combo2.selectedItem);  
trace(obj.opera + ":"+ combo1.selectedItem); 
trace(obj.val + ":"+ datepick.text);
true;addopenbracket.enabled =
true;combo2.enabled =
true;combo1.enabled =
true;
private function orSubmit():void{
for each(var obj:Object inadhoc){ 
if(obj.fname == combo2.selectedItem && obj.opera == combo1.selectedItem){ 
if(combo2.selectedItem != "DATEDEPLOYED" || combo2.selectedItem != "DATEUPLOADED"){ 
if(txt.visible == true){ 
trace("2 equals"); 
var temp:Object = newObject();
else{ 
trace(obj.fname + ":"+ combo2.selectedItem);  
trace(obj.opera + ":"+ combo1.selectedItem); 
trace(obj.val + ":" + "'"+txt.text+"'");
else if(obj.fname == addclosebracket.label){ 
if(combo2.selectedItem != "DATEDEPLOYED" || combo2.selectedItem != "DATEUPLOADED"){ 
if(txt.visible == true){ 
trace("2 equals"); 
var temp:Object = newObje

you declare Fchg's three parameter is any data type,so you can directly use Fchg
function.
"beawhycn" <[email protected]> wrote:
>
1.if buffer type=FML,then ' Fchg(sendBuf, Fldid("ACCOUNT_ID"), 0, accountNumber&,
0)' can add the accountnumber into sendbuffer.
2.if buffer type=STRING ,then how can i add a simple string into sendbuffer
before
the tpcall()?
Eager for the reply.

Similar Messages

  • How to add strings to file?..

    Hi, everybody!
    Please, help me in a simple question:
    I have to add strings to text-file.
    ADD!
    My task is:
    if(the file isn't excist ){
    create new file, open it and write, for example, 3 strings;
    else{
    open file and ADD 3 strings;
    How to make it?
    My text-file is big - nearly 65MB..
    I'll be happy, if you can give example..

    This file allows you to add to already available file, but if not available, it will be created.
    Tell me if this helps you .
    Cheers
    * @Title    :AddFile.java
    * @date     :today
    * @version  :v1.0
    * @author   :Your name
    import java.io.*;
    import java.net.*;
    public class AddFile extends Object
        public static void main (String [] args) throws IOException
            System.out.print ("Enter your message: ");
            BufferedReader input = new BufferedReader (
                              new InputStreamReader (System.in));
            String userInput = input.readLine ();
            BufferedWriter out = new BufferedWriter (
                           new FileWriter ("akoko.txt", true));
            out.write (userInput);
            out.close ();
    }

  • How to add a search/edit/delete options for the following program.

    after printing the out put, i want to search for the line and i want to edit the same line then add to the output and also i want to delete the line from the command line
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.InputStreamReader;
    public class CustomerDetails {
    public static void main(String[] args) throws IOException {
    BufferedReader dataIn= new BufferedReader(new InputStreamReader(System.in));
    FileWriter writer;
    String name= "";
    String DOB = "";
    String Address = "";
    String Phonenumber = " ";
    File filename = new File("customerData.txt");
    boolean append = true;
    writer = new FileWriter(filename,append);
    writer.write("\n");
    try {
    System.out.println("Please enter your name");
    name = dataIn.readLine();
    System.out.println("please enter ut DOB");
    DOB = dataIn.readLine();
    System.out.println("please enter ur Address");
    Address = dataIn.readLine();
    System.out.println("please enter ur phone number");
    Phonenumber = dataIn.readLine();
    writer.write("name:");
    writer.write(name);
    writer.write("DOB:");
    writer.write(DOB);
    writer.write("Address:");
    writer.write(Address);
    writer.write("Phone number:");
    writer.write(Phonenumber);
    writer.close();
    catch (IOException e) {
    e.printStackTrace();
    System.out.println("thanks for entering  the data");
    }

    Well, what I'm suggesting isn't as simple as editing a few lines.
    Are you familiar with using objects?
    The idea is to organize your data in a way that makes sense. Since you want to keep track of multiple people at once, does it make sense to only have one variable each for name, address, etc? If you put all of the variables dealing with a person into a Person object, you can then instantiate as many people as you'd like- without worrying about keeping track of them one variable at a time.
    I'd say that should be your first step. After that, we can talk about searching through them.

  • How to add string to sendbuffer in visual basic?

    1.if buffer type=FML,then ' Fchg(sendBuf, Fldid("ACCOUNT_ID"), 0, accountNumber&,
    0)' can add the accountnumber into sendbuffer.
    2.if buffer type=STRING ,then how can i add a simple string into sendbuffer before
    the tpcall()?
    Eager for the reply.

    you declare Fchg's three parameter is any data type,so you can directly use Fchg
    function.
    "beawhycn" <[email protected]> wrote:
    >
    1.if buffer type=FML,then ' Fchg(sendBuf, Fldid("ACCOUNT_ID"), 0, accountNumber&,
    0)' can add the accountnumber into sendbuffer.
    2.if buffer type=STRING ,then how can i add a simple string into sendbuffer
    before
    the tpcall()?
    Eager for the reply.

  • How to add plugin into Edit preferences?

    hi,
    i want to show my plugin into Edit>preferences instead of extension.i added my plugin into menu>Edit>Preferences but it iis not added into preferences dialogbox where other plugin like general,type.
    how can i add my panel/plugin into preferences.

    You can only add C++ plugins to the prefs dialog.

  • How to add event listener to datagrid ROW

    I need to know if it is possible to have the datagrid rows execute a state change.
    For example: I have a datagrid populated with various items, when one row is selected I want it to change the state of a part of the canvas it is in.
    How is this possible? I can not give the row an id so I would not be able to say "when row is selected change state" because there is no way to tell what row is selected.
    Help please. Thanks.

    See Flex 4 and MXDataGridItemRenderer.

  • How to add/modify and edit OSX Account in my code

      Our company need to build a OA system, need to combine our Web OA and OSX Server' features, now need to CRUD(add/modify/delete/view) OSX Contact's account user data and group data, how to implement it in PHP Code or cocoa-touch code?

    Weird... When I set up an new account there are no "advanced" options. It requests name, email address, and password then it polls for the account and finds it and done. When I go into mail>prefs>accounts my only options under "advanced" is this http://twitpic.com/5fb41x

  • Add a suffix to dataGrid output..how ?

    Hi,
    Try as I might for a week now, and having googled for similar examples, to no avail, I have no idea how to code for the following need.
    I need the output from a DataGrid to receive a suffix of _Level2 when the user has clicked on a button taking them to Level2 of a map. Output happens on the hover for the DataGrid.
    Likewise to receive a suffix _Level3 when they are at Level3 of the map, having clicked on a button that takes them to that level.
    Is csv feed to the DataGrid going to allow this in fact ? Would xml be the way ? Having gotten this far as csv have we fallen at an xml fence ?
    If the code was a simple line such as
    Add suffix _Level2 to DataGrid output
    It would sit I presume in the code that occurs when button DistrictA_text is clicked as shown below, no doubt its not as simple as this infantile one liner !
    If this referred to a function it could be there as such. Not yet needed to place a function in such a location but understand this is possible. It then runs a function coded elsewhere.
    // The Buttons
    Map_Collection.County_mc.DistrictA_text.addEventListener(MouseEvent.CLICK, hideShow_DistrictCalledA);
    //The functions that deal with when the buttons at County Level are pressed
    function hideShow_DistrictCalledA(event:MouseEvent):void {
    Map_Collection.County_mc.visible = !Map_Collection.County_mc.visible;
    Map_Collection.DistrictA.visible =!Map_Collection.DistrictA.visible;
    County_Button.visible = !County_Button.visible
    Map_Collection.Map_Collection_Stage.visible=true;
    Map_Collection.County_Sttmnts_Level1.visible=false;
    Map_Collection.County_Brown_Layer.visible=false;
    DistrictF_Title.visible=false;
    DistrictE_Title.visible=false;
    DistrictD_Title.visible=false;
    DistrictA_Title.visible = ! DistrictA_Title.visible
    DistrictB_Title.visible=false;
    DistrictC_Title.visible=false;
    Add suffix _Level2 to DataGrid output
    There is another option...the DataGrid code strips out gaps and apostrophes on the hover and maybe its to this that the Suffix code needs adding.
    The code for that is:-
    import flash.net.URLLoader;
    import flash.events.Event;
    import flash.net.URLRequest;
    import fl.data.DataProvider;
    import fl.controls.DataGrid;
    import fl.events.ListEvent
    makeAllVisibleF(false);
    var urlLoader:URLLoader = new URLLoader();
    urlLoader.addEventListener(Event.COMPLETE,completeF);
    urlLoader.load(new URLRequest("NamesWithNullCellsGapsApostrophes.csv"));
    var dg:DataGrid
    function completeF(e:Event):void{
        var dataS:String = e.target.data;
        var dataA:Array = dataS.split("\n").join("").split("\r");
        var dpA:Array = [];
        var itemA:Array;
    var r:RegExp = /\W/g;
        for(var i:int=0;i<dataA.length;i++){
            itemA = dataA[i].split(",");
    //dpA.push({"col1": String(itemA[0]).replace(r, ""), "col2": String(itemA[1]).replace(r, ""), "col3": String(itemA[2]).replace(r, "")});   
             dpA.push({"col1":itemA[0],"col2":itemA[1],"col3":itemA[2]});
    var dp:DataProvider = new DataProvider(dpA);
        dg.columns = ["col1","col2","col3"]
        dg.dataProvider = dp;
    dg.addEventListener(ListEvent.ITEM_ROLL_OVER,ShowSymbols);
    function ShowSymbols(e:ListEvent):void{
    makeAllVisibleF(false);
    var r:RegExp = /\W/g;
    for(var s:String in e.item){
    if(e.item[s]){
    var clipName :String = String(e.item[s]).replace(r,"");
    this[clipName].visible=true;
    trace(s,e.item[s])
    function makeAllVisibleF(b:Boolean):void{
    UpperDowning.visible=b
    ColletsReach.visible=b;
    TamarBrook.visible=b;
    BrookfieldSouth.visible=b;
    MitresGate.visible=b;
    FinchsGreen.visible=b;
    BarterHeath.visible=b;
    KingsTump.visible=b;
    Agap.visible=b;
    TemplarsReach.visible=b;
    Castleton.visible=b;
    UptonUponSevern.visible=b;
    Any help appreciated but I/we havent a clue how to approach this one.
    Envirographics

    Hi Kglad,
    many thanks indeed, you cannot believe how happy I am to see that fix.
    To see the simplicity of that is so welcome, append and not suffix thoughts may have yielded results in my search and clouded my judgement.
    use a variable to store the current level and append that variable to your dg's rollover output: 
    var currentLevel:String="_Level2";
    I have buttons on the first map the user sees with instance names such as DistrictA_Level2  DistrictB_Level2 etc for Districts A to F  to use for indicating to Flash coding that  Level2 has been chosen to navigate to by user. Likewise the map they arrive at has buttons with instance names such as DistrictA_Level3  DistrictB_Level3 etc to use for coding.
    With an EventListener OnClick for the buttons running in the code, how do I get the coding to take that suffix  _Level2 or _Level3 depending on what button was clicked and place it into
    var currentLevel:String="_Level2";
    in other words how do I get the var above to get that _Level2 or _Level3 from a click on one of the buttons ?
    I am also planning to have a single button to take user from Level3 back to previous level, instance name will be ReturnTo_Level2
    Envirographics

  • How to add Column to Adobe flex mx:DataGrid in mxml and/or actionsctpt?

    I have simple mxml code
    <mx:DataGrid id="DGG"
                 editable="true">
        <mx:dataProvider>
            <mx:Object scheduledDate="4/1/2006"/>
        </mx:dataProvider>
    </mx:DataGrid>
    <mx:Button id="SetBut"
               label="Set Array as Data Provider"
               click="SetDP(); AddBut.visible = true;"
               x="100.5"
               y="164"
               width="211"/>
    <mx:Button id="AddBut"
               label="Add a column!"
               click="AddCol();"
               x="100.5"
               y="194"
               width="211"
               visible="false"/>
    <mx:Script>
        <![CDATA[
            import mx.controls.dataGridClasses.DataGridColumn;
            import mx.collections.ArrayCollection;
            [Bindable]
            public var MyAC:ArrayCollection=new ArrayCollection([{scheduledDate: "4/1/2006", homeTeam: "Chester Bucks"}]);
            public function SetDP():void
                DGG.dataProvider=MyAC
            public function AddCol():void
                MyAC.addItem({scheduledDate: "4/5/2007", homeTeam: "Long Valley Hitters", Umpire: "Amanda Hugenkis"});
                DGG.columns.push(new DataGridColumn("Umpire"));
        ]]>
    </mx:Script>
    I want to add rows to my table datagrid how to do such thing?
    How to add Column to Adobe flex mx:DataGrid in mxml and/or actionsctpt?
    (You can put this code in Flash or AIR app - it will compile with no errors, but will not add any columns=( )

    Change this:
                 public function SetDP():void
                    DGG.dataProvider=MyAC
                    MyAC.addItem({scheduledDate: "4/5/2007", homeTeam: "Long Valley Hitters", Umpire: "Amanda Hugenkis"});
                public function AddCol():void
                    var dgc:DataGridColumn = new DataGridColumn("Umpire");
                    var ca:Array = DGG.columns;
                    ca.push(dgc);
                    DGG.columns = ca;
    Dany

  • Is my system DV7t-3300, or DV7t Quad Edition? And how to add more memory to it?

    Dear forum,
    I have an old notebook computer bought back in March 2010. It's a DV7t series. As it's getting slowly, I'm thinking of adding more memory. However, I'm not sure how much memory the motherboard can support for the upgrade.
    I'm stuck with the first step, which is to decide the model number (and then motherboard) of it.
    My original order email states the following:
    YOUR CUSTOMIZED HP PC
    dv7t quad edition
    • Genuine Windows 7 Home Premium 64-bit
    • Intel(R) Core(TM) i7-720QM Quad Core processor (1.6GHz, 6MB L3 Cache) with Turbo Boost up to 2.8 GHz
    • FREE Upgrade to 4GB DDR3 System Memory (2 Dimm) from 3GB DDR3 System Memory (2 Dimm)
    • 500GB 7200RPM SATA Hard Drive with HP ProtectSmart Hard Drive Protection
    • 1GB Nvidia GeForce GT 320M - For i7-720QM and i7-820QM Processors
    • 17.3" diagonal HD+ High-Definition HP LED BrightView Widescreen Display (1600 x 900)
    • LightScribe SuperMulti 8X DVD+/-RW with Double Layer Support
    • Webcam Only
    • Intel Wireless-N Card with Bluetooth
    • HP Integrated HDTV Hybrid Tuner
    • HP Color Matching Keyboard
    • 8 Cell Lithium Ion Battery
    • No Modem
    • Microsoft(R) Works 9.0
    • HP Home & Home Office Store in-box envelope
    However, the bottom of the notebook computer has a label that specifies the following:
    Pavillion dv7
    Serial: omitted
    Product: WH764AV
    Model: Q dv7t-3300.
    I visited some memory buying website like 'crucial.com'. However, I was prompted to select the model and there were both dv7t-3300 CTO and dv7t Quad Edition. Unfortunately, they resulted in different kinds of memory (although the specs of the sugested memory modules seem to be the same, these two memory modules have different model numbers).
    So, what model number my system has? 3300 CTO or Quad Edition?
    Perhaps a suitable model number would tell me which motherboard this notebook has. Additionally, can anyone advice me about on how much memory my notebook can support (8GB or 16GB) maximum?
    Thanks a lot!
    Cruiser

    Hi,
    Max is 8Gb using the following manual:
        http://h10032.www1.hp.com/ctg/Manual/c01859666.pdf
    And from the following site:
       https://www.ramcity.com.au/upgrade/hp-compaq/pavilion-dv7-series-notebook/dv7t-3300-cto/73893
    The above manual shows you how to add/replace RAM. Looks like you have to buy 2 x 4Gb sticks.
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • How to save the edited datagrid using array collection?

    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
                        xmlns:s="library://ns.adobe.com/flex/spark"
                        xmlns:mx="library://ns.adobe.com/flex/mx"
                        title="demo2">
              <fx:Declarations>
                        <!-- Place non-visual elements (e.g., services, value objects) here -->
              </fx:Declarations>
              <fx:Script>
                        <![CDATA[               
                                  import mx.collections.ArrayCollection;
                                  import mx.events.FlexEvent;
                                  import spark.components.gridClasses.IGridItemEditor;
                                  import spark.components.gridClasses.IGridItemRenderer;
                                  import spark.events.GridItemEditorEvent;
                                  [Bindable]
                                  private var myDP:ArrayCollection = new ArrayCollection([
                                            {label1:"Day1 ", label2:" Sub1", label3:"Sub2 ", label4:"Sub3 ", label5:"Sub4 ", label6:"Sub5 ", label7:"Sub6 "},
                                            {label1:"Day2 ", label2:" Sub1", label3:"Sub2 ", label4:"Sub3 ", label5:"Sub4 ", label6:"Sub5 ", label7:"Sub6 "},
                                            {label1:"Day3 ", label2:" Sub1", label3:"Sub2 ", label4:"Sub3 ", label5:"Sub4 ", label6:"Sub5 ", label7:"Sub6 "},
                                            {label1:"Day4 ", label2:" Sub1", label3:"Sub2 ", label4:"Sub3 ", label5:"Sub4 ", label6:"Sub5 ", label7:"Sub6 "},
                                            {label1:"Day5 ", label2:" Sub1", label3:"Sub2 ", label4:"Sub3 ", label5:"Sub4 ", label6:"Sub5 ", label7:"Sub6 "},
                                            {label1:"Day6 ", label2:" Sub1", label3:"Sub2 ", label4:"Sub3 ", label5:"Sub4 ", label6:"Sub5 ", label7:"Sub6 "}
                                  protected function myDG_gridItemEditorSessionSaveHandler(event:GridItemEditorEvent):void
                                            // TODO Auto-generated method stub
                                  protected function button1_clickHandler(event:MouseEvent):void
                                            // TODO Auto-generated method stub
                                            navigator.popView();
                                  protected function button2_clickHandler(event:MouseEvent):void
                                            // TODO Auto-generated method stub
                                            myDG.editable=false;
                                            myDP
                                  protected function myDG_exitStateHandler(event:FlexEvent):void
                                            // TODO Auto-generated method stub
                        ]]>
              </fx:Script>
              <s:DataGrid id="myDG" x="10" y="45" width="460" height="240" dataProvider="{myDP}"
                                            editable="true" exitState="myDG_exitStateHandler(event)" fontSize="11"
                                            gridItemEditorSessionSave="myDG_gridItemEditorSessionSaveHandler(even t)"
                                            rowHeight="30" variableRowHeight="true" selectionMode="singleCell" >
                        <s:columns>
                                  <s:ArrayList>
                                            <s:GridColumn dataField="label1" headerText="day" editable="false" />
                                            <s:GridColumn dataField="label2" headerText="9-10am"/>
                                            <s:GridColumn dataField="label3" headerText="10-11am"/>
                                            <s:GridColumn dataField="label4" headerText="11am-12noon"/>
                                            <s:GridColumn dataField="label5" headerText="1-2pm"/>
                                            <s:GridColumn dataField="label6" headerText="2-3pm"/>
                                            <s:GridColumn dataField="label7" headerText="3-4pm"/>            
                                  </s:ArrayList>
                        </s:columns >
              </s:DataGrid>
              <s:Button x="404" y="10" width="53" height="27" label="Back" click="button1_clickHandler(event)"
                                    fontSize="13"/>
              <s:Button x="24" y="10" width="56" height="27" label="Save" click="button2_clickHandler(event)"
                                    fontSize="14"/>
    </s:View>
    please help me with this code...i dontknow how to save the data edited in the datagrid back to my arrayollection!!!

    please help with this......

  • How do I add text and edit my PDF file?

    how do i add text and edit my pdf file

    Hi pilothorse,
    To edit a PDF file you need to use Acrobat. If you don't have Acrobat, you can try it for free for 30 days. See www.adobe.com/products/acrobat.html for more information.

  • How to add image between two string

    how to add a image between two string .
    example :
    String one <IMG> String two

    grid1 = new GridLayout( 2, 3, 5, 5);
    container = getContentPane();
    container.setLayout(grid1);
    The parameters in GridLayout specifies 2 rows, 3 columns, 5pixels of horizontal gap, 5pixels of vertical gap.
    Did what i could to help, now can somebody help me with JDialog? =(

  • How to add attributed string to JTextPane

    Hi all,
    Could you tell me how to add an attributed string into a Textpane.
    Textpane only takes a styledDocument. Is there any way to convert attributed string into a styled document.
    Are there any components , which we can include attributed string , instead of simple string. Becoz i want my text to have variable fonts.

    Hello,
    check this short course about [url http://developer.java.sun.com/developer/onlineTraining/GUI/Swing2/shortcourse.html#JFCStyled]JTextPane and StyledDocument.
    Heres a small example:import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Font;
    import java.awt.event.*;
    public class AttributedStringTest extends JFrame
         public static void main(String[] args)
              new AttributedStringTest();
         private JTextPane textPane = null;
         private StyledDocument doc = null;
         AttributedStringTest()
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              initMenuBar();
              initTextPane();
              setSize(500, 300);
              setLocationRelativeTo(null);
              setVisible(true);
         private void initMenuBar()
              JMenuBar mbar = new JMenuBar();
              JMenu menu = new JMenu("StyleConstants");
              JMenuItem item = new JMenuItem("Color");
              item.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent e)
                        Color color =
                             JColorChooser.showDialog(
                                  AttributedStringTest.this,
                                  "Color Chooser",
                                  Color.cyan);
                        if (color != null)
                             MutableAttributeSet attr = new SimpleAttributeSet();
                             StyleConstants.setForeground(attr, color);
                             textPane.setCharacterAttributes(attr, false);
              menu.add(item);
              JMenu font = new JMenu("Font");
              font.add(item = new JMenuItem("12"));
              item.addActionListener(new StyledEditorKit.FontSizeAction("font-size-12", 12));
              font.add(item = new JMenuItem("24"));
              item.addActionListener(new StyledEditorKit.FontSizeAction("font-size-24", 24));
              font.add(item = new JMenuItem("36"));
              item.addActionListener(new StyledEditorKit.FontSizeAction("font-size-36", 36));
              font.addSeparator();
              font.add(item = new JMenuItem("Serif"));
              item.setFont(new Font("Serif", Font.PLAIN, 12));
              item.addActionListener(
                   new StyledEditorKit.FontFamilyAction("font-family-Serif", "Serif"));
              font.add(item = new JMenuItem("SansSerif"));
              item.setFont(new Font("SansSerif", Font.PLAIN, 12));
              item.addActionListener(
                   new StyledEditorKit.FontFamilyAction("font-family-SansSerif", "SansSerif"));
              font.add(item = new JMenuItem("Monospaced"));
              item.setFont(new Font("Monospaced", Font.PLAIN, 12));
              item.addActionListener(
                   new StyledEditorKit.FontFamilyAction("font-family-Monospaced", "Monospaced"));
              font.addSeparator();
              menu.add(font);
              mbar.add(menu);
              setJMenuBar(mbar);
         private void initTextPane()
              doc = new DefaultStyledDocument();
              textPane = new JTextPane(doc);
              JScrollPane scroll = new JScrollPane(textPane);
              getContentPane().add(scroll);
              final JTextField text = new JTextField();
              text.setToolTipText("Please enter something");
              text.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent e)
                        try
                             doc.insertString(doc.getLength(), text.getText(), textPane.getInputAttributes());
                        } catch (BadLocationException bad)
              getContentPane().add(text, BorderLayout.SOUTH);
    //not formatted version:import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Font;
    import java.awt.event.*;
    public class AttributedStringTest extends JFrame
         public static void main(String[] args)
              new AttributedStringTest();
         private JTextPane textPane = null;
         private StyledDocument doc = null;
         AttributedStringTest()
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              initMenuBar();
              initTextPane();
              setSize(500, 300);
              setLocationRelativeTo(null);
              setVisible(true);
         private void initMenuBar()
              JMenuBar mbar = new JMenuBar();
              JMenu menu = new JMenu("StyleConstants");
              JMenuItem item = new JMenuItem("Color");
              item.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent e)
                        Color color =
                             JColorChooser.showDialog(
                                  AttributedStringTest.this,
                                  "Color Chooser",
                                  Color.cyan);
                        if (color != null)
                             MutableAttributeSet attr = new SimpleAttributeSet();
                             StyleConstants.setForeground(attr, color);
                             textPane.setCharacterAttributes(attr, false);
              menu.add(item);
              JMenu font = new JMenu("Font");
              font.add(item = new JMenuItem("12"));
              item.addActionListener(new StyledEditorKit.FontSizeAction("font-size-12", 12));
              font.add(item = new JMenuItem("24"));
              item.addActionListener(new StyledEditorKit.FontSizeAction("font-size-24", 24));
              font.add(item = new JMenuItem("36"));
              item.addActionListener(new StyledEditorKit.FontSizeAction("font-size-36", 36));
              font.addSeparator();
              font.add(item = new JMenuItem("Serif"));
              item.setFont(new Font("Serif", Font.PLAIN, 12));
              item.addActionListener(
                   new StyledEditorKit.FontFamilyAction("font-family-Serif", "Serif"));
              font.add(item = new JMenuItem("SansSerif"));
              item.setFont(new Font("SansSerif", Font.PLAIN, 12));
              item.addActionListener(
                   new StyledEditorKit.FontFamilyAction("font-family-SansSerif", "SansSerif"));
              font.add(item = new JMenuItem("Monospaced"));
              item.setFont(new Font("Monospaced", Font.PLAIN, 12));
              item.addActionListener(
                   new StyledEditorKit.FontFamilyAction("font-family-Monospaced", "Monospaced"));
              font.addSeparator();
              menu.add(font);
              mbar.add(menu);
              setJMenuBar(mbar);
         private void initTextPane()
              doc = new DefaultStyledDocument();
              textPane = new JTextPane(doc);
              JScrollPane scroll = new JScrollPane(textPane);
              getContentPane().add(scroll);
              final JTextField text = new JTextField();
              text.setToolTipText("Please enter something");
              text.addActionListener(new ActionListener()
                   public void actionPerformed(ActionEvent e)
                        try
                             doc.insertString(doc.getLength(), text.getText(), textPane.getInputAttributes());
                        } catch (BadLocationException bad)
              getContentPane().add(text, BorderLayout.SOUTH);
    regards
    Tim

  • How to add/edit render video presets?

    I can't find how to add or edit render video presets used in (File->Export->Render Video) dialog.
    Am I missing something?

    JJMack wrote:
    I'm afraid that your are right there are preset in CS6 for its media server dll and they are stored where you found them. You can use the preset and modify setting in the preset for a custom rendering. However there is no save new preset button so your custom setting can be saved as a new preset.
    Yes, You can modify some rendering parameters (Dimensions, Frame Rate, Field order, Aspect Ratio).
    But You can't modify preset settings. What I mean is target bitrate, maximum bitrate, key frame distance etc.)
    You can't even determine what the settings are... (unless I missed something?)
    To get the full Media Sever you need an Adobe video product like Premiere Pro. Perhaps use a trial verson to create additional preset that can be added to Photoshop CS6 presets. Presets for better Quicktime support for example.
    This is not the issue. I have CS6 Master Collection installed...
    Photoshop don't see Media Encoder presets and vice versa...

Maybe you are looking for