// Path: XAppDbgServer/src/com/sonymobile/tools/xappdbg/XAppDbgWidget.java
// public final class XAppDbgWidget {
// 
//     private String mName;
//     private String mParam;
//     private boolean mInline;
//     private XAppDbgModule mModule;
//     private int mId;
//     private int mChannel;
//     private static int lastId = 1;
// 
//     public XAppDbgWidget(String name, String param, boolean inline, XAppDbgModule mod) {
//         mName = name;
//         mParam = param;
//         mInline = inline;
//         mModule = mod;
//         mId = lastId++;
//     }
// 
//     public void writeToClient(DataOutputStream os) throws IOException {
//         os.writeUTF(mName);
//         os.writeUTF(mParam);
//         os.writeBoolean(mInline);
//         os.writeInt(mId);
//         os.writeInt(getChannel());
//     }
// 
//     public static XAppDbgWidget readFromServer(DataInputStream is) throws IOException {
//         String name = is.readUTF();
//         String param = is.readUTF();
//         boolean inline = is.readBoolean();
//         XAppDbgWidget ret = new XAppDbgWidget(name, param, inline, null);
//         ret.mId = is.readInt();
//         ret.mChannel = is.readInt();
//         return ret;
//     }
// 
//     public boolean isInline() {
//         return mInline;
//     }
// 
//     public String getName() {
//         return mName;
//     }
// 
//     public String getParams() {
//         return mParam;
//     }
// 
//     public int getId() {
//         return mId;
//     }
// 
//     public int getChannel() {
//         return mModule == null ? mChannel : mModule.getChannel();
//     }
// }
// 
// Path: XAppDbgClient/src/com/sonymobile/tools/xappdbg/client/XAppDbgConnection.java
// public interface XAppDbgConnection {
// 
//     /**
//      * Request to close the connection.
//      * @param error If set to true, the connection is closed due to a detected error
//      */
//     public void close(boolean error);
// 
//     /**
//      * Create a packet to be sent on this connection.
//      * @param channel The channel id
//      * @return The new empty packet
//      */
//     public Packet createPacket(int channel);
// 
// }
// 
// Path: XAppDbgClient/src/com/sonymobile/tools/xappdbg/client/XAppDbgWidgetView.java
// public abstract class XAppDbgWidgetView {
// 
//     private XAppDbgWidget mWidget;
//     private JFrame mWin;
//     private XAppDbgConnection mConnection;
// 
//     public XAppDbgWidgetView(XAppDbgWidget widget, XAppDbgConnection connection) throws IOException {
//         mWidget = widget;
//         mConnection = connection;
//     }
// 
//     public static XAppDbgWidgetView create(XAppDbgWidget w, XAppDbgConnection connection) throws IOException {
//         String name = w.getName();
//         if (name.equals(XAppDbgWidgetIDs.W_OBJ_PROP_LIST)) {
//             return new WObjPropertyList(w, connection);
//         }
//         if (name.equals(XAppDbgWidgetIDs.W_OBJ_TREE)) {
//             return new WObjTree(w, connection);
//         }
//         if (name.equals(XAppDbgWidgetIDs.W_TRIGGER)) {
//             return new WTrigger(w, connection);
//         }
//         System.out.println("Don't know how to create widget " + name);
//         return null;
//     }
// 
//     public void showWindow() throws IOException {
//         if (mWin == null) {
//             mWin = new JFrame();
//             JPanel panel = new JPanel();
//             mWin.getContentPane().add(panel);
//             createUI(panel);
//             mWin.pack();
//             mWin.setLocationRelativeTo(null);
//         }
//         mWin.setVisible(true);
//     }
// 
//     public XAppDbgWidget getWidget() {
//         return mWidget;
//     }
// 
//     public abstract void createUI(JPanel panel) throws IOException;
// 
//     public XAppDbgConnection getConnection() {
//         return mConnection;
//     }
// 
//     protected Packet createPacket() {
//         return mConnection.createPacket(mWidget.getChannel());
//     }
// 
// }


import com.sonymobile.tools.xappdbg.XAppDbgWidget;
import com.sonymobile.tools.xappdbg.client.XAppDbgConnection;
import com.sonymobile.tools.xappdbg.client.XAppDbgWidgetView;
import java.awt.BorderLayout;
import java.io.IOException;
import javax.swing.JPanel;
/*
 * Copyright (C) 2012 Sony Mobile Communications AB
 *
 * This file is part of XAppDbg.
 *
 * XAppDbg is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * XAppDbg is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with XAppDbg.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.sonymobile.tools.xappdbg.client.properties;




/**
 * The UI interface for the "object's properties" widget.
 * This widget allows the changing of the properties of one object.
 */
public class WObjPropertyList extends XAppDbgWidgetView {

    public WObjPropertyList(XAppDbgWidget widget, XAppDbgConnection connection) throws IOException {
        super(widget, connection);
    }

    @Override
    public void createUI(JPanel panel) throws IOException {
        panel.setLayout(new BorderLayout());
        JPropertyPanel props = new JPropertyPanel(this);
        panel.add(props, BorderLayout.CENTER);

// Path: XAppDbgServer/src/com/sonymobile/tools/xappdbg/XAppDbgWidget.java
// public final class XAppDbgWidget {
// 
//     private String mName;
//     private String mParam;
//     private boolean mInline;
//     private XAppDbgModule mModule;
//     private int mId;
//     private int mChannel;
//     private static int lastId = 1;
// 
//     public XAppDbgWidget(String name, String param, boolean inline, XAppDbgModule mod) {
//         mName = name;
//         mParam = param;
//         mInline = inline;
//         mModule = mod;
//         mId = lastId++;
//     }
// 
//     public void writeToClient(DataOutputStream os) throws IOException {
//         os.writeUTF(mName);
//         os.writeUTF(mParam);
//         os.writeBoolean(mInline);
//         os.writeInt(mId);
//         os.writeInt(getChannel());
//     }
// 
//     public static XAppDbgWidget readFromServer(DataInputStream is) throws IOException {
//         String name = is.readUTF();
//         String param = is.readUTF();
//         boolean inline = is.readBoolean();
//         XAppDbgWidget ret = new XAppDbgWidget(name, param, inline, null);
//         ret.mId = is.readInt();
//         ret.mChannel = is.readInt();
//         return ret;
//     }
// 
//     public boolean isInline() {
//         return mInline;
//     }
// 
//     public String getName() {
//         return mName;
//     }
// 
//     public String getParams() {
//         return mParam;
//     }
// 
//     public int getId() {
//         return mId;
//     }
// 
//     public int getChannel() {
//         return mModule == null ? mChannel : mModule.getChannel();
//     }
// }
// 
// Path: XAppDbgClient/src/com/sonymobile/tools/xappdbg/client/XAppDbgConnection.java
// public interface XAppDbgConnection {
// 
//     /**
//      * Request to close the connection.
//      * @param error If set to true, the connection is closed due to a detected error
//      */
//     public void close(boolean error);
// 
//     /**
//      * Create a packet to be sent on this connection.
//      * @param channel The channel id
//      * @return The new empty packet
//      */
//     public Packet createPacket(int channel);
// 
// }
// 
// Path: XAppDbgClient/src/com/sonymobile/tools/xappdbg/client/XAppDbgWidgetView.java
// public abstract class XAppDbgWidgetView {
// 
//     private XAppDbgWidget mWidget;
//     private JFrame mWin;
//     private XAppDbgConnection mConnection;
// 
//     public XAppDbgWidgetView(XAppDbgWidget widget, XAppDbgConnection connection) throws IOException {
//         mWidget = widget;
//         mConnection = connection;
//     }
// 
//     public static XAppDbgWidgetView create(XAppDbgWidget w, XAppDbgConnection connection) throws IOException {
//         String name = w.getName();
//         if (name.equals(XAppDbgWidgetIDs.W_OBJ_PROP_LIST)) {
//             return new WObjPropertyList(w, connection);
//         }
//         if (name.equals(XAppDbgWidgetIDs.W_OBJ_TREE)) {
//             return new WObjTree(w, connection);
//         }
//         if (name.equals(XAppDbgWidgetIDs.W_TRIGGER)) {
//             return new WTrigger(w, connection);
//         }
//         System.out.println("Don't know how to create widget " + name);
//         return null;
//     }
// 
//     public void showWindow() throws IOException {
//         if (mWin == null) {
//             mWin = new JFrame();
//             JPanel panel = new JPanel();
//             mWin.getContentPane().add(panel);
//             createUI(panel);
//             mWin.pack();
//             mWin.setLocationRelativeTo(null);
//         }
//         mWin.setVisible(true);
//     }
// 
//     public XAppDbgWidget getWidget() {
//         return mWidget;
//     }
// 
//     public abstract void createUI(JPanel panel) throws IOException;
// 
//     public XAppDbgConnection getConnection() {
//         return mConnection;
//     }
// 
//     protected Packet createPacket() {
//         return mConnection.createPacket(mWidget.getChannel());
//     }
// 
// }


// Path: XAppDbgClient/src/com/sonymobile/tools/xappdbg/client/properties/WObjPropertyList.java
import com.sonymobile.tools.xappdbg.XAppDbgWidget;
import com.sonymobile.tools.xappdbg.client.XAppDbgConnection;
import com.sonymobile.tools.xappdbg.client.XAppDbgWidgetView;
import java.awt.BorderLayout;
import java.io.IOException;
import javax.swing.JPanel;

/*
 * Copyright (C) 2012 Sony Mobile Communications AB
 *
 * This file is part of XAppDbg.
 *
 * XAppDbg is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * XAppDbg is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with XAppDbg.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.sonymobile.tools.xappdbg.client.properties;




/**
 * The UI interface for the "object's properties" widget.
 * This widget allows the changing of the properties of one object.
 */
public class WObjPropertyList extends XAppDbgWidgetView {

    public WObjPropertyList(XAppDbgWidget widget, XAppDbgConnection connection) throws IOException {
        super(widget, connection);
    }

    @Override
    public void createUI(JPanel panel) throws IOException {
        panel.setLayout(new BorderLayout());
        JPropertyPanel props = new JPropertyPanel(this);
        panel.add(props, BorderLayout.CENTER);

        props.init();