General class and setting properties vs specific inner class

This is a general question for discussion. I am curious to know how people differentiate between instantiating a standard class and making property adjustments within a method versus defining a new inner class with the property adjustments defined within.
For example, when laying out a screen do you:
- instantiate all the objects, set properties, and define the layout all within a method
- create an inner class that defines the details of the layout (may reference other inner classes if complex) that is then just instantiated within a method
- use some combination of the two depending on size and complexity.
- use some other strategy
Obviously, by breaking the work up into smaller classes you are simplifying the structure since each class is taking on less responsibility, as well as hiding the details of the implementaion from higher level classes. On the other hand, if you are just instantiating an object and making some SET calls is creating an inner class overkill.
Is there a general consensus for an approach? I am curious to hear the approach of others.

it's depends on your design..
usually, if the application is simple and is not expected to be maintain (update..etc..) than I just have all the building of the gui within the same class (usually..the main class that extends JFrame).
if the application follows the MVC pattern, than I would have a seperate class that build the GUI for a particular View. I would create another class to handle the ActionEvent, and other event (Controller)
I rarely use inner class...and only use them to implements the Listerner interface (but only for simple application)..

Similar Messages

  • Select multiple ROIs and set properties to each of them

    Hi all,
    I am now working on a project dealing with thermal camera images. What I need to do is to set several regions of interests and assign some specific properties like average temperature and emissivity to those ROIs.
    So I was wondering:
    1. is that possible to select several ROIs with an array keeping updating ROIs the user has chosen on the front panel? (Or each ROI could have a cluster on the front panel that contains its properties, that can be changed later.)
    2. is that possible to set specific properties like temperature to the specfic ROI, and those properties will be updated to the ROI?
    Thank you so much, and looking forward to some great ideas or advice.
    Cheers,
    Sunming
    Solved!
    Go to Solution.

    Hi All,
    The attachment is what I have currently made. However, instead of creating a .txt file to display information, it would be perfect to display the ROI's name and its properties in the front panel, like in the first column is ROI 1, ROI 2, ROI 3, etc., and the other columns will deal with some information about the specific ROI and its properties.. Since I could not find anything similar here, I really need your help.
    Thanks,
    Sunming
    Attachments:
    test.vi ‏57 KB

  • API to access and set properties for MP4 files

    I am looking for some APIs in Visual C++ to use in Visual Studio to set
    and get properties for .mp4 files. Can anyone help me in this regard?

    Hi Rahul,
    Try using the Windows Media Format SDK with help from the below document:
    http://blogs.msdn.com/b/tims/archive/2004/03/28/extracting-metadata-from-windows-media-files.aspx
    Alternatively, you can give a try to ffmpeg libraries for a open source alternative.
    https://www.ffmpeg.org/download.html
    (Please mark as answer if this solves your query. Please upvote if this reply is helpful).
    Regards,
    Rajesh Nath

  • How to get and set graph propertis using UIGraph instance

    Hi,
    I have added barGraph graph component on *.jspx and also added buttons like "Get properties" and "Set Properties". On "Get Properties" button action, I want to get all the attrributes of barGraph using UIGraph and also want to get "getGroupAttributes" and "getSeriesAttributes".
    I saw examples on gettiing the Group attributes using the click event on the graph.
    Is there any way to get the attributes on some button action like "Get Properties" without any click event on graph?
    Thanks,
    Gopal

    [Copying the answer here from the internal forum discussion so that other customers can benefit]
    Hi Gopal,
    You can call getValue on the UIGraph to get the GraphDataModel, then to use the data access APIs from there.
    Once you get the DataAccess from the GraphDataModel, you can call getMemberMetadata to get the members on the row and column edge.
    This method is documented in the interface CDFDataAccess:
    http://docs.oracle.com/cd/E16162_01/apirefs.1112/e17492/oracle/dss/util/CDFDataAccess.html#getMemberMetadata%28int,%20int,%20int,%20java.lang.String%29
    You should use the following constants for the series and groups:
    DataDirector.COLUMN_EDGE=groups
    DataDirector.ROW_EDGE=series
    Use the method getEdgeExtent to find out how many members are in the series and groups:
    http://docs.oracle.com/cd/E16162_01/apirefs.1112/e17492/oracle/dss/util/CDFDataAccess.html#getEdgeExtent%28int%29
    Method getLayerMetadata is the correct way to get the names of the layers, a.k.a "dimensions" displayed in the graph.
    DataAccess is used to read the data from the Graph. You set the data in the Graph by setting tabular data, using data binding by dragging and dropping from the data control palette, or by implementing a custom DataSource and setting it on the graph.
    http://docs.oracle.com/cd/E16162_01/apirefs.1112/e17492/oracle/dss/dataView/CommonDataview.html#setDataSource%28oracle.dss.util.DataSource%29
    However, implementing a custom data source is not trivial, and you should only use that approach if you can't use tabular data or regular binding against the available data controls.
    This doc chapter might help in understanding data source requirements for different Graph types:
    http://docs.oracle.com/cd/E16162_01/web.1112/e16181/dv_graph.htm#CEGBGCDG
    Hope this helps,
    Katia

  • How to set buildID.xml and custom.properties in SDK

    Hello,
    I just completed a new build deployment of SAP ME5.2, because after I deployed the new version, I don't think I have set a
    correct version number.Can you someone give me a sample how to set the buildID.xml and custom.properties? I am a new on the SAP ME5.2
    The Base version is ME_Base_5.2.5.16.5_netweaver-71_Update.zip and
    MEClient_Base_5.2.5.16.5_netweaver-71_Update.zip. the HB customzation
    version is ME_xxxxxx_2.0.0.0.x_netweaver-71.
    Within the sap note 1484551, you mentioned we need change the
    SDKInstallDir/build/buildID.xml file, here is the context of the file:
    buildID.xml -
    <?xml version="1.0" encoding="UTF-8"?>
    <buildID xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <customer>XXXXXX</customer>
    <revision>1.0.0.0</revision>
    <build>1</build>
    </buildID>
    buildID.xml -
    1. how can we change the revision and build?
    There is another file BuildToolDir/build/script/custom.properties, here
    is the file context:
    custom.properties----
    This file contains build properties used to configure the build
    system.
    The name of the software vendor implementing the customizations.
    vendor.name=xxxxxxxxx
    Vendor build identifier. This value is used to uniquely identify
    customizations built by a particular vendor for a particular customer
    and base
    application version.
    This is also used in path locations and in naming certain build
    artifacts, like the custom EJB module and the utility classes archive.
    vendor.id=xxxxxxxxx
    The installation of the J2EE engine installed in the development
    environment.
    ex. C:/usr/sap/CE1\J00
    j2ee.instance.dir=J2EEInstanceDir
    The web context path used to access the main web application. This
    is used by the build to set the
    context-root value in application.xml after an update has been
    imported.
    web.context.path=
    The web context path used to access the production XML interface web
    application. This is used by the build to set the
    context-root value in application.xml after an update has been
    imported.
    xml.context.path=
    The web context path to access resources from the web extension
    application, like images and work instruction HTML files.
    web-ext.context.path=web-ext
    The target database vendor. Valid values are 'oracle' or 'sqlserver'.db.vendor=ORACLE
    The JDBC driver configured for the application server.
    db.drivername=VMJDBC
    JDBC connection propertes for the WIP (Work In Process) database.
    This is the primary application database.
    db.wip.driverclassname=
    db.wip.driver.url=
    db.wip.host=
    db.wip.port=
    db.wip.sid=
    db.wip.user=
    db.wip.password=
    JDBC connection propertes for the ODS (Open Data Store) database.
    This is the offline reporting and archiving database.
    db.ods.driverclassname=
    db.ods.driver.url=
    db.ods.host=
    db.ods.port=
    db.ods.sid=
    db.ods.user=
    db.ods.password=
    Flag indicating whether to add DPMO NC codes to NC idat files when a
    new update is imported. This value is initially
    set by the installer according the the user selection.
    dpmo.nc.codes=
    The default locale used by the production system. The default locale
    is the locale used to display locale
    specific text and messages when the requested locale is not
    available. This property does not need to
    be set if the default locale is english.
    default.locale=en
    Used when running the build from Eclipse to locate the java compiler
    used by the WebLogic EJB compiler.
    jdk.home=C:/Program Files/Java/jdk1.5.0_20
    Compiler debug mode. If set to 'true', debug symbols will be
    compiled into the byte code.
    compile.debug=true
    Keystore alias
    security.alias=xxxxx
    Keystore password
    security.storepass=ChangeIt
    Key password
    security.keypass=ChangeIt
    Keystore type (jks=default,jceks,pkcs12)
    security.storetype=jks
    Optional source control build identifier that is to be displayed with
    standard version information.
    scs.build.ID=
    Optional extended version information to be displayed with standard
    version information.
    ext.info=
    custom.properties----
    2. How can we change this here?
    Regards,
    Leon Lu
    Edited by: Leon Lu on Aug 4, 2011 11:14 AM
    Edited by: Leon Lu on Aug 4, 2011 11:21 AM

    Hi,
    I created one request with logo in the header an page in the footer etc. and called StyleSheet. After you can import this formats by each request.
    You can do this in compound layout.
    Regards,
    Stefan

  • How to read sort sequence and other properties of a specification in Cg02 .

    hello ,
    i need to update the specification properties in CG02 basing on sort sequence  for hazards and mariane pollutant of a specification.
    do we have any standard Bapi or Fm to read the properties of Specification .
    thanks for your help
    Ananta

    well -
    specifications are rather complicated - there are many tables linked by internal keys. As most of them (and all in the folowing overview) begin with 'EST' I only use the subseqent letters - so table ESTRH is written as RH below.
    Here an -  uncomplete - overview
    Header: RH
    2nd level:
    - RR References
    - RI Identifiers
    - MJ Material Joins
    - VH Valuation Headers (containing field ESTCAT for valuation type)
    3rd level:
    - VA - Valuation (instance - containing sequence number (field ORD - non unique!)
    4th level - data of the valuation:
    - PR Data stored in class system (such as regulation, DG-Class)
    - DU Usage
    - VP Components
    - 0F Transport Classification (containing Hazard Inducers)
    In general you can determine the related table if you look at the technical info at CG02. The structure name will be like
    "RCGxxIOT" where xx stands for the last two letters of the table ESTxx. The structure of interfaces in FUGR C1F5 are defined with a similar pattern: ESPRH_APIxx_TAB_TYPE.
    To read the data, you may use FM C1F5_SPECIFICATIONS_READ  which has sufficient documentation. You may refer to the documentation of obsolete FM C1F2_SUBSTANCES_READ as well.
    A good alternative is  BAPI_BUS1077_GETDETAIL - as this is a BAPI Function it should work after an upgrade while FM of C1F5 migh make some adaption necessary.
    However - it will take some days to understand both - the data model of specifications and the related FMs. I personally would recommend a developer familar with this 1yr+ before asking for implementations that are not only reading data - but they are hard to find....
    have fun!
    hp

  • Creating buttons on the fly and setting button properties

    If I have a view and want to add buttons to it "on the fly" from values in an array, is that something straightforward to do?
    I have an array of UIImageVIew objects and would like to create buttons from them (showing the image on the buttons) and associate those buttons with a method in my implementation file. That would be a lot more general and flexible than creating the buttons in the Interface Builder I would imagine.
    And one more question - can I freely set button properties while doing that? Or in Objective-C can I only set properties that are already pre-defined for that class?
    Thanks!
    doug

    Thanks for your reply.
    That.... works! Thanks!
    And I can generate the button and click on it and it calls my other method and that works too. Cool!
    The syntax is still very mysterious to me, but I suppose eventually I'll understand what it all means.
    Breaking it down to see what it means:
    [button1 addTarget:self action:@selector(selectedHandler1:) forControlEvents:UIControlEventTouchUpInside];
    * button1 is the object I created (I'm going to try to do this in a loop next.)
    * addTarget is a message I am sending to button1 and the content of the message is "self", which refers to - this button? I'm not sure why such a message would be necessary.
    * action is another message sent to button1 and the contents of that message are a little harder to parse. I see the result, and can mimic the syntax now that I've seen it, but I don't really understand what the @ is for, or the : after the method name or why this wouldn't just be "action: selectedHandler". I'm sure the language designers have a logical reason for all that, but I don't quite "grok" those extra symbols yet.
    * forControlEvents is another message sent to button1 and the event message itself is clear in its meaning.
    Anyway, that is working and I can refer more to the UIButton class reference now and try to set more stuff, like position it better, etc.
    Thanks very much!
    doug

  • Is there any difference between java Beans and general class library?

    Hello,
    I know a Java Bean is just a java object. But also a general class instance is also a java object. So can you tell me difference between a java bean and a general class instance? Or are the two just the same?
    I assume a certain class is ("abc.class")
    Second question is is it correct that we must only use the tag <jsp:useBean id="obj" class="abc.class" scope="page" /> when we are writng jsp program which engage in using a class?Any other way to use a class( create object)? such as use the java keyword "new" inside jsp program?
    JohnWen604
    19-July-2005

    a bean is a Java class, but a Java class does not have to be a bean. In other words a bean in a specific Java class and has rules that have to be followed before you have a bean--like a no argument constructor. There are many other features of beans that you may implement if you so choose, but read over the bean tutorial and you'll see, there is a lot to a bean that is just not there for many of the Java classes.
    Second question: I'll defer to someone else, I do way to little JSP's to be able to say "must only[\b]".

  • I re-set password using specific user ID but when I put new password in it does not say incorrect password  it just spins and spins never accepting it.  What is the problem?

    I re-set password using specific user ID but when I put new password in it does not say incorrect password  it just spins and spins never accepting it.  What is the problem?

    Update on my problem connecting in Itunes with my Airport Express. Not sure if anything I tried made a difference
    but I finally got the Pop up window saying this device requires a Password. I entered the password and I can once again use the Airport Express as a remote speaker.

  • Message Selector and Setting JMS Header Properties PL/SQL Enqueue

    Currently I am attempting to use the Message selector functionality. I just know know exactly how we need to set the property in PL/SQL when enqueuing. I also want to verify the syntax that I should use in the event that I am doing this incorrectly...
    The code I am using to test the enqueue is
    declare
    enqueue_options dbms_aq.enqueue_options_t;
    message_properties dbms_aq.message_properties_t;
    message_handle RAW(16);
    agent sys.aq$_agent := sys.aq$_agent('', null, null);
    message sys.aq$_jms_text_message;
    recipients DBMS_AQ.aq$_recipient_list_t;
    BEGIN
    message := sys.aq$_jms_text_message.construct;
    message.set_text('<ORDER><HEADER_ID>16992531</HEADER_ID></ORDER>');
    message.header.set_string_property('bamfilter','ORDER_ENTRY');
    dbms_aq.enqueue(queue_name => 'XX_OM_MONITOR_Q',
    enqueue_options => enqueue_options,
    message_properties => message_properties,
    payload => message,
    msgid => message_handle);
    COMMIT;
    END;
    we have tried a few other methods, but still to no avail...
    the syntax I believe for the selector in the ems should be bamfilter='ORDER_ENTRY'
    Any help would be great.
    The DB the Queue is locate is on 10g if that makes any difference...

    Yes
    I am able to specify JMS Header and JMS Properties when producing a message. However I am not able to user "Message Selector" to filter messages based on JMS Properties information when consuming messages.
    In the link you provide, there is an example on how to use Message Selector:
    # (a copy from the link)
    Message Selector
    ...for example, you can enter logic, such as:
    * JMSType = 'car' AND color = 'blue' AND weight > 2500
    * Country in ('UK', 'US', 'France')
    I believe the example with "Country" is exactly what I need, but I can´t get it work.
    I create the same example above, setting a property named "Country" in the JMSHeader, sending the message to a JMS Queue (BPEL Process #1) and try to comsume it on the Message Selector (BPEL Process#2), but JMSAdapter never consumes the message.
    Thanks for your help.

  • How to set default Header and Footer properties for PDF

    Hi,
    Currently we are manually setting the 'PDF and Print Control' properties for each and every dashboard. We understand that print pdf properties are controlled by pdfstyle.fst file under $SAROOTDIR\web\app\res\s_oracle10\b_mozilla_4 but don't have the exact property names to include in header and footer section.
    By default, we want to include company logo, the saved name of the report/dashboard tab and created time in the header. And page# in the footer.
    Where can we set these and what properties names should be used in order for these to be set for every new request/dashboard that is created.
    Thanks and Regards

    Hi,
    I created one request with logo in the header an page in the footer etc. and called StyleSheet. After you can import this formats by each request.
    You can do this in compound layout.
    Regards,
    Stefan

  • From yesterday, I have been facing the problems in my iphone and my wife iphone. The same problem, "cannot connect to itunes store". I have strong internet connection. I tried all the possible way I could like setting, general, date and time.....etc.

    I have proble of "cannot connect to itunes store. After I have updated the new software ios6, the problem arised in one of my mobile. In the second mobile, I didnot updated the software.Today in the morning, the problem ariesed in that mobile as well. I cannot open the itunes, don't have access to apple store . I tried to solve the problem like going to setting, general, Date and time, automatically off, keeping one year ahead date. I tried all the possible options I could get from the googel. How do I get rid of this problem?

    No - I have not tried other routers on my network.
    What I meant was I could use my itouch on other users wireless networks without any issues.
    I'll update the routers DNS to try  using Google's 8.8.8.8 instead of my ISP.
    Is the issue DNS performance using local ISP -or are there other possibel isues when using local isp DNS?

  • [svn:osmf:] 13988: PARB feedback: change mediaWidth and mediaHeight properties on layout renderer related classes to measuredWidth , and measuredHeight.

    Revision: 13988
    Revision: 13988
    Author:   [email protected]
    Date:     2010-02-05 00:24:52 -0800 (Fri, 05 Feb 2010)
    Log Message:
    PARB feedback: change mediaWidth and mediaHeight properties on layout renderer related classes to measuredWidth, and measuredHeight.
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/composition/CompositeDisplayObjectTrait.as
        osmf/trunk/framework/OSMF/org/osmf/containers/MediaContainer.as
        osmf/trunk/framework/OSMF/org/osmf/display/MediaContainerGroup.as
        osmf/trunk/framework/OSMF/org/osmf/layout/DefaultLayoutRenderer.as
        osmf/trunk/framework/OSMF/org/osmf/layout/ILayoutTarget.as
        osmf/trunk/framework/OSMF/org/osmf/layout/LayoutRenderer.as
        osmf/trunk/framework/OSMF/org/osmf/layout/LayoutTargetSprite.as
        osmf/trunk/framework/OSMF/org/osmf/layout/MediaElementLayoutTarget.as
        osmf/trunk/framework/OSMFTest/org/osmf/display/TestMediaContainerGroup.as
        osmf/trunk/framework/OSMFTest/org/osmf/layout/TestDefaultLayoutRenderer.as
        osmf/trunk/framework/OSMFTest/org/osmf/layout/TestLayoutRenderer.as
        osmf/trunk/framework/OSMFTest/org/osmf/layout/TestMediaElementLayoutTarget.as
        osmf/trunk/framework/OSMFTest/org/osmf/layout/TesterLayoutTargetSprite.as

    Hi Lucas, 
    We don't recommend making layout renderers for each item that needs to be laid out.  In fact you shouldn't be creating layout renderers at all (they are created automatically by the MediaContainer).  The best way to layout Media is to add LayoutMetadata to the MediaElements.  If you want to integrate layout into your controls, which aren't MediaElements, I wouldn't suggest you place them manually on the stage, and do you yourself.  If you absolutely need to use the OSMF layout system, I would recommend creating a MediaElement to wrap your controls, and then give the wrapper the layout metadata you need.   The easiest approach though, is to look at the OSMFPlayer example, which has a skinnable player.  You can specify image for every button in the player, as well as background color, etc....
    We will be releasing a white paper on the subject of layout in the coming weeks.   I'll be sure to include a section on laying out your player controls.
    Ryan O'Connell
    OSMF Engineering

  • [svn:osmf:] 14871: Fixing anchoring 'right' and 'bottom' properties not being applied on items that don't have a width/ height and position set.

    Revision: 14871
    Revision: 14871
    Author:   [email protected]
    Date:     2010-03-19 01:05:54 -0700 (Fri, 19 Mar 2010)
    Log Message:
    Fixing anchoring 'right' and 'bottom' properties not being applied on items that don't have a width/height and position set.
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/layout/LayoutRenderer.as

    If you're just doing it in a back and forth or spiral fashion, you don't need to check whether a square's been filled in. You just go from a start point to an end point. Those points and the squares in between are determined by simple arithmetic.
    If you're doing it randomly, I wouldn't use the GUI elements themselves. I'd have, for example, and array of booleans that tells whether each square has been filled in.

  • [svn:bz-trunk] 21285: Need to change _parent, privateCall and instance properties from private to protected in order to extend this class for another project

    Revision: 21285
    Revision: 21285
    Author:   [email protected]
    Date:     2011-05-20 07:53:23 -0700 (Fri, 20 May 2011)
    Log Message:
    Need to change _parent, privateCall and instance properties from private to protected in order to extend this class for another project
    Modified Paths:
        blazeds/trunk/apps/ds-console/console/ConsoleManager.as

    Revision: 21285
    Revision: 21285
    Author:   [email protected]
    Date:     2011-05-20 07:53:23 -0700 (Fri, 20 May 2011)
    Log Message:
    Need to change _parent, privateCall and instance properties from private to protected in order to extend this class for another project
    Modified Paths:
        blazeds/trunk/apps/ds-console/console/ConsoleManager.as

Maybe you are looking for