MinPool vs MinSize
Hello:
Using managed connection pool through Jboss, using the standard
kodo-service.xml in kodo\JCA directory.
I see references JBossManagedConnectionPool and KodoMAnagedConnectionPool in
the file. See MinPool and MaxPool
parameters and also MinSize and MaxSize parameters. Can anyone explain and
contrast these? What is JBossManagedConnectionPool vs
KodoMAnagedConnectionPool and MinPool vs MinSize params? Any performance
implications for these params?
Regards,
Pradeep
Hello:
Using managed connection pool through Jboss, using the standard
kodo-service.xml in kodo\JCA directory.
I see references JBossManagedConnectionPool and KodoMAnagedConnectionPool in
the file. See MinPool and MaxPool
parameters and also MinSize and MaxSize parameters. Can anyone explain and
contrast these? What is JBossManagedConnectionPool vs
KodoMAnagedConnectionPool and MinPool vs MinSize params? Any performance
implications for these params?
Regards,
Pradeep
Similar Messages
-
Revision: 3263
Author: [email protected]
Date: 2008-09-18 16:40:14 -0700 (Thu, 18 Sep 2008)
Log Message:
Fix a bug in LayoutItemUIC.as where explicit width/height was affecting ILayoutItem::minSize property. It should not.
Reviewed by Glenn
Modified Paths:
flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/LayoutItemUIC.aserror dateField not selecion date 27/11/2002 ?
This is bug flex 3 ?
thanks -
I have a JFrame that contains among other things two JScrollPanes in Panels with BoxLayout. The ScrollPanes have MinimumSizes. However, it is still possible to resize the Frame, so that the ScrollPanes become smaller than their MinSize.
Problem: How can I prevent that?
I tried giving the Frame's contentPane a minSize and BoxLayout, but that only gives me a compilererror ("BoxLayout can't be shared").
Anyone with a suggestion?Try this one. It is working with the contentPane minimum size:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class MinimumSizeJFrame extends JFrame {
public MinimumSizeJFrame() {
super();
setMinimumSizeAbility();
public MinimumSizeJFrame(String title) {
super(title);
setMinimumSizeAbility();
public MinimumSizeJFrame(GraphicsConfiguration gc) {
super(gc);
setMinimumSizeAbility();
public MinimumSizeJFrame(String title, GraphicsConfiguration gc) {
super(title, gc);
setMinimumSizeAbility();
private void setMinimumSizeAbility(){
this.addComponentListener(
new ComponentAdapter() {
public void componentResized(ComponentEvent event) {
if (event.getSource() instanceof JFrame)
int width = getWidth();
int height = getHeight();
Dimension contentPaneDimensions = ((JFrame) event.getSource()).getContentPane().getMinimumSize();
if (width < contentPaneDimensions.getWidth())
width = (int) contentPaneDimensions.getWidth();
if (height < contentPaneDimensions.getHeight())
height = (int) contentPaneDimensions.getHeight();
setSize(width, height); -
Kodo on jboss-3.0.0RC1
Has anyone gotten KodoJDO to successfully deploy on jboss-3.0.0RC1? It
seems that it deploys ok, but does not register any kodo object under the
name "java:/kodo" or whatever jndi name you have specified in the
kodo-services.xml file. Below is my kodo-services.xml file. Does anyone
see any problems?
Thanks,
-Chris
<?xml version="1.0" encoding="UTF-8"?>
<server>
<!-- you should put any JDBC drivers you will be using
in the lib directory so Kodo can find them -->
<classpath codebase="lib" archives="*"/>
<mbean code="org.jboss.resource.ConnectionFactoryLoader"
name="jboss.jca:service=ConnectionFactoryLoader,name=Kodo">
<attribute name="JndiName">kodo</attribute>
<depends optional-attribute-name="ResourceAdapterName">
jboss.jca:service=RARDeployment,name=KodoJDO
</depends>
<depends optional-attribute-name="ConnectionManagerFactoryLoaderName">
jboss.jca:service=ConnectionManagerFactoryLoader,name=MinervaNoTransCMFactory
</depends>
<!-- fill in your Kodo configuration properties here.
Don't forget your license key. -->
<attribute name="ManagedConnectionFactoryProperties">
LicenseKey=<insert your own>
MinPool=0
MaxPool=10
ConnectionDriverName=org.hsqldb.jdbcDriver
ConnectionURL=jdbc:hsqldb:hsql://localhost:1476
ConnectionUserName=sa
ConnectionPassword=
DictionaryName=com.solarmetric.kodo.impl.jdbc.schema.dict.HSQLDictionary
WarnOnPersistentTypeFailure=true
</attribute>
<attribute name="ConnectionManagerProperties">
MinSize=0
MaxSize=10
BlockingTimeoutMillis=5000
IdleTimeoutMinutes=30
CleanupIntervalMinutes=10
MaxIdleTimeoutPercent=1.0
</attribute>
<attribute name="PrincipalMappingClass">
org.jboss.resource.security.ManyToOnePrincipalMapping
</attribute>
<attribute name="PrincipalMappingProperties">
</attribute>
</mbean>
</server>Chris-
Sorry for the long delay in responding. The problem is that the JBoss
people have completely changed the configuration format for resource
adaptor -service.xml files between 3.0.0beta and 3.0.0RC1, and there is
no documentation on it as of yet (see my posting on the thread "NPE when
calling getConnection() with JBoss").
I'll work on making a working example for 3.0.0RC1.
Chris West <[email protected]> wrote:
Has anyone gotten KodoJDO to successfully deploy on jboss-3.0.0RC1? It
seems that it deploys ok, but does not register any kodo object under the
name "java:/kodo" or whatever jndi name you have specified in the
kodo-services.xml file. Below is my kodo-services.xml file. Does anyone
see any problems?
Thanks,
-Chris
<?xml version="1.0" encoding="UTF-8"?>
<server>
<!-- you should put any JDBC drivers you will be using
in the lib directory so Kodo can find them -->
<classpath codebase="lib" archives="*"/>
<mbean code="org.jboss.resource.ConnectionFactoryLoader"
name="jboss.jca:service=ConnectionFactoryLoader,name=Kodo">
<attribute name="JndiName">kodo</attribute>
<depends optional-attribute-name="ResourceAdapterName">
jboss.jca:service=RARDeployment,name=KodoJDO
</depends>
<depends optional-attribute-name="ConnectionManagerFactoryLoaderName">
jboss.jca:service=ConnectionManagerFactoryLoader,name=MinervaNoTransCMFactory
</depends>
<!-- fill in your Kodo configuration properties here.
Don't forget your license key. -->
<attribute name="ManagedConnectionFactoryProperties">
LicenseKey=<insert your own>
MinPool=0
MaxPool=10
ConnectionDriverName=org.hsqldb.jdbcDriver
ConnectionURL=jdbc:hsqldb:hsql://localhost:1476
ConnectionUserName=sa
ConnectionPassword=
DictionaryName=com.solarmetric.kodo.impl.jdbc.schema.dict.HSQLDictionary
WarnOnPersistentTypeFailure=true
</attribute>
<attribute name="ConnectionManagerProperties">
MinSize=0
MaxSize=10
BlockingTimeoutMillis=5000
IdleTimeoutMinutes=30
CleanupIntervalMinutes=10
MaxIdleTimeoutPercent=1.0
</attribute>
<attribute name="PrincipalMappingClass">
org.jboss.resource.security.ManyToOnePrincipalMapping
</attribute>
<attribute name="PrincipalMappingProperties">
</attribute>
</mbean>
</server>--
Marc Prud'hommeaux [email protected]
SolarMetric Inc. http://www.solarmetric.com
Kodo Java Data Objects Full featured JDO: eliminate the SQL from your code -
Error while configuring kodo to lookup a datasource
We had a working application using EEPersistenceManagerFactory
I changed the kodo.properties to lookup a non XA JDBC datasource.
After that the application is working fine (it creates
,updates,deletes,finds record in the DB)
but SystemOut.log has the following error for every operation
We are using Kodo 2.5.0, Websphere 5.0 and Oracle 8
How can we avoid getting this error ?.
We tried to find any property on the Websphere datasource which can be
altered to avoid this error but no luck.
Thanks
Paresh
[10/7/03 15:30:45:467 IST] 3d8b2d1a MCWrapper E J2CA0081E: Method
destroy failed while trying to execute method destroy on ManagedConnection
com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl@437f6d23 from resource
<null>. Caught exception: com.ibm.ws.exception.WsException: DSRA0080E: An
exception was received by the Data Store Adapter. See original exception
message: Cannot call 'cleanup' on a ManagedConnection while it is still in
a transaction..
at
com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:222)
at
com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:172)
at
com.ibm.ws.rsadapter.AdapterUtil.createDataStoreAdapterException(AdapterUtil.java:182)
at
com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.cleanupTransactions(WSRdbManagedConnectionImpl.java:1826)
at
com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.destroy(WSRdbManagedConnectionImpl.java:1389)
at com.ibm.ejs.j2c.MCWrapper.destroy(MCWrapper.java:1032)
at
com.ibm.ejs.j2c.poolmanager.FreePool.returnToFreePool(FreePool.java:259)
at com.ibm.ejs.j2c.poolmanager.PoolManager.release(PoolManager.java:777)
at com.ibm.ejs.j2c.MCWrapper.releaseToPoolManager(MCWrapper.java:1304)
at
com.ibm.ejs.j2c.ConnectionEventListener.connectionClosed(ConnectionEventListener.java:195)
at
com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.processConnectionClosedEvent(WSRdbManagedConnectionImpl.java:843)
at
com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.closeWrapper(WSJdbcConnection.java:569)
at com.ibm.ws.rsadapter.jdbc.WSJdbcObject.close(WSJdbcObject.java:132)
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.close(SQLExecutionManagerImpl.java:814)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.release(JDBCStoreManager.java(Inlined
Compiled Code))
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.load(JDBCStoreManager.java(Compiled
Code))
at
com.solarmetric.kodo.runtime.StateManagerImpl.loadFields(StateManagerImpl.java(Compiled
Code))
at
com.solarmetric.kodo.runtime.StateManagerImpl.preSerialize(StateManagerImpl.java:784)
at com.paresh.core.vo.Release.jdoPreSerialize(Release.java)
at com.paresh.core.vo.Release.writeObject(Release.java)
at java.lang.reflect.Method.invoke(Native Method)
at
com.ibm.rmi.io.IIOPOutputStream.invokeObjectWriter(IIOPOutputStream.java:703)
at com.ibm.rmi.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:671)
at
com.ibm.rmi.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:146)
at
com.ibm.rmi.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:217)
at com.ibm.rmi.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:144)
at com.ibm.rmi.iiop.CDROutputStream.write_value(CDROutputStream.java:1590)
at com.ibm.rmi.iiop.CDROutputStream.write_value(CDROutputStream.java:1107)
at
com.paresh.core.interfaces._EJSRemoteStatelessValidation_da16513c_Tie.findCorrectionAction(_EJSRemoteStatelessValidation_da16513c_Tie.java:309)
at
com.paresh.core.interfaces._EJSRemoteStatelessValidation_da16513c_Tie._invoke(_EJSRemoteStatelessValidation_da16513c_Tie.java:104)
at
com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:582)
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:437)
at com.ibm.rmi.iiop.ORB.process(ORB.java:320)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:1544)
at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2063)
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:63)
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592)
kodo.properties
com.solarmetric.kodo.LicenseKey=
#com.solarmetric.kodo.ee.ManagedRuntimeProperties=TransactionManagerName=java:/TransactionManager
com.solarmetric.kodo.ee.ManagedRuntimeProperties=TransactionManagerName=TransactionFactory
TransactionManagerMethod=com.ibm.ejs.jts.jta.TransactionManagerFactory.getTransactionManager
#com.solarmetric.kodo.ee.ManagedRuntimeClass=com.solarmetric.kodo.ee.InvocationManagedRuntime
com.solarmetric.kodo.ee.ManagedRuntimeClass=com.solarmetric.kodo.ee.AutomaticManagedRuntime
#javax.jdo.PersistenceManagerFactoryClass=com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory
javax.jdo.PersistenceManagerFactoryClass=com.solarmetric.kodo.impl.jdbc.ee.EEPersistenceManagerFactory
javax.jdo.option.ConnectionFactoryName=ds/kodo/DataSource1
javax.jdo.option.Optimistic=true
javax.jdo.option.RetainValues=true
javax.jdo.option.NontransactionalRead=true
#com.solarmetric.kodo.DataCacheClass=com.solarmetric.kodo.runtime.datacache.plugins.CacheImpl
# Changing these to a non-zero value will dramatically increase
# performance, but will cause in-memory databases such as Hypersonic
# SQL to never exit when your main() method exits, as the pooled
# connections in the in-memory database will cause a daemon thread to
# remain running.
javax.jdo.option.MinPool=5
javax.jdo.option.MaxPool=10We do have a makeTransientAll() before the object returns from Session
Bean.
We also tried the JCA path
After installing the JCA RAR and doing a lookup for
PersistenceManagetFactory the same code is not throwing any exception.
The exception is thrown only if datasource is used.
Thanks
Paresh
Marc Prud'hommeaux wrote:
Paresh-
It looks like you are returning a collection of instances from an EJB,
which will cause them to be serialized. The serialization is happening
outside the context of a transaction, and Kodo needs to obtain a
connection. Websphere seems to not like that.
You have a few options:
1. Call makeTransientAll() on all the instances before you return them
from your bean methods
2. Manually instantiate all the fields yourself before sending them
back. You could use a bogus ObjectOutputStream to do this.
3. In 3.0, you can use the new detach() API to detach the instances
before sending them back to the client.
In article <[email protected]>, Paresh wrote:
We had a working application using EEPersistenceManagerFactory
I changed the kodo.properties to lookup a non XA JDBC datasource.
After that the application is working fine (it creates
,updates,deletes,finds record in the DB)
but SystemOut.log has the following error for every operation
We are using Kodo 2.5.0, Websphere 5.0 and Oracle 8
How can we avoid getting this error ?.
We tried to find any property on the Websphere datasource which can be
altered to avoid this error but no luck.
Thanks
Paresh
[10/7/03 15:30:45:467 IST] 3d8b2d1a MCWrapper E J2CA0081E: Method
destroy failed while trying to execute method destroy on ManagedConnection
com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl@437f6d23 from resource
<null>. Caught exception: com.ibm.ws.exception.WsException: DSRA0080E: An
exception was received by the Data Store Adapter. See original exception
message: Cannot call 'cleanup' on a ManagedConnection while it is still in
a transaction..
at
com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:222)
at
com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.<init>(DataStoreAdapterException.java:172)
at
com.ibm.ws.rsadapter.AdapterUtil.createDataStoreAdapterException(AdapterUtil.java:182)
at
com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.cleanupTransactions(WSRdbManagedConnectionImpl.java:1826)
at
com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.destroy(WSRdbManagedConnectionImpl.java:1389)
at com.ibm.ejs.j2c.MCWrapper.destroy(MCWrapper.java:1032)
at
com.ibm.ejs.j2c.poolmanager.FreePool.returnToFreePool(FreePool.java:259)
at com.ibm.ejs.j2c.poolmanager.PoolManager.release(PoolManager.java:777)
at com.ibm.ejs.j2c.MCWrapper.releaseToPoolManager(MCWrapper.java:1304)
at
com.ibm.ejs.j2c.ConnectionEventListener.connectionClosed(ConnectionEventListener.java:195)
at
com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.processConnectionClosedEvent(WSRdbManagedConnectionImpl.java:843)
at
com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.closeWrapper(WSJdbcConnection.java:569)
at com.ibm.ws.rsadapter.jdbc.WSJdbcObject.close(WSJdbcObject.java:132)
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.close(SQLExecutionManagerImpl.java:814)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.release(JDBCStoreManager.java(Inlined
Compiled Code))
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.load(JDBCStoreManager.java(Compiled
Code))
at
com.solarmetric.kodo.runtime.StateManagerImpl.loadFields(StateManagerImpl.java(Compiled
Code))
at
com.solarmetric.kodo.runtime.StateManagerImpl.preSerialize(StateManagerImpl.java:784)
at com.paresh.core.vo.Release.jdoPreSerialize(Release.java)
at com.paresh.core.vo.Release.writeObject(Release.java)
at java.lang.reflect.Method.invoke(Native Method)
at
com.ibm.rmi.io.IIOPOutputStream.invokeObjectWriter(IIOPOutputStream.java:703)
at com.ibm.rmi.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:671)
at
com.ibm.rmi.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:146)
at
com.ibm.rmi.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:217)
at com.ibm.rmi.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:144)
at com.ibm.rmi.iiop.CDROutputStream.write_value(CDROutputStream.java:1590)
at com.ibm.rmi.iiop.CDROutputStream.write_value(CDROutputStream.java:1107)
at
com.paresh.core.interfaces._EJSRemoteStatelessValidation_da16513c_Tie.findCorrectionAction(_EJSRemoteStatelessValidation_da16513c_Tie.java:309)
at
com.paresh.core.interfaces._EJSRemoteStatelessValidation_da16513c_Tie._invoke(_EJSRemoteStatelessValidation_da16513c_Tie.java:104)
at
com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:582)
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:437)
at com.ibm.rmi.iiop.ORB.process(ORB.java:320)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:1544)
at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2063)
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:63)
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592)
kodo.properties
com.solarmetric.kodo.LicenseKey=
#com.solarmetric.kodo.ee.ManagedRuntimeProperties=TransactionManagerName=java:/TransactionManager
>>
>
com.solarmetric.kodo.ee.ManagedRuntimeProperties=TransactionManagerName=TransactionFactory
>>
>
TransactionManagerMethod=com.ibm.ejs.jts.jta.TransactionManagerFactory.getTransactionManager
>>
>>
>
#com.solarmetric.kodo.ee.ManagedRuntimeClass=com.solarmetric.kodo.ee.InvocationManagedRuntime
>>
>
com.solarmetric.kodo.ee.ManagedRuntimeClass=com.solarmetric.kodo.ee.AutomaticManagedRuntime
>>
>>
>
#javax.jdo.PersistenceManagerFactoryClass=com.solarmetric.kodo.impl.jdbc.JDBCPersistenceManagerFactory
>>
>
javax.jdo.PersistenceManagerFactoryClass=com.solarmetric.kodo.impl.jdbc.ee.EEPersistenceManagerFactory
>>
javax.jdo.option.ConnectionFactoryName=ds/kodo/DataSource1
javax.jdo.option.Optimistic=true
javax.jdo.option.RetainValues=true
javax.jdo.option.NontransactionalRead=true
#com.solarmetric.kodo.DataCacheClass=com.solarmetric.kodo.runtime.datacache.plugins.CacheImpl
>>
>>
# Changing these to a non-zero value will dramatically increase
# performance, but will cause in-memory databases such as Hypersonic
# SQL to never exit when your main() method exits, as the pooled
# connections in the in-memory database will cause a daemon thread to
# remain running.
javax.jdo.option.MinPool=5
javax.jdo.option.MaxPool=10
Marc Prud'hommeaux [email protected]
SolarMetric Inc. http://www.solarmetric.com -
How do I implement a virtual keyboard? I will compensate for assistance.
I have created a simple Adobe Air Windowed Application. The application uses the mx:HTML controls to load a web page inside my application. I have tried other means to load the web page but due to formatting issue, all other methods fail to load the page correctly. Any solution will need to use the mx HTML controls.
I have added a virtual keyboard to my project. However, when I enter a text field and then select a key on the virtual keyboard, I lose focus on the text field.
I understand the concept of event listeners and using a variable to store the text field id and using a focus event to gain the id of the text field. However, I am not a programmer by no means and this is way above my head. I am looking for someone to spend 30 or 60 minutes adding the needed code to my project so I can use the virtual keyboard. I would be willing to send someone a gift card to their favorite restaurant as compensation.
I have included the 4 files that make up my project (File names are in read text).
Your help will be greatly appreciated.
Best regards,
Joe
Main.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:components="com.uibuzz.components.*"
xmlns:local="*"
xmlns:keyboard=".*"
xmlns:panel=".*"
showStatusBar="false"
alwaysInFront="true"
creationComplete="RunFunction(event)">
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function RunFunction(event:FlexEvent):void
nativeWindow.x = (Capabilities.screenResolutionX - nativeWindow.width) / 2;
nativeWindow.y = (Capabilities.screenResolutionY - nativeWindow.height) / 2;
// Mouse.hide();
html.location = 'https://google.com';
]]>
</fx:Script>
<fx:Script>
<![CDATA[
// Virtual Keyboard
import com.uibuzz.events.VirtualKeyboardEvent;
protected function HandleKeyEvent(event:VirtualKeyboardEvent):void
trace("Key pressed: " + event.keyLabel);
]]>
</fx:Script>
<mx:HTML id="html"
paintsDefaultBackground="false"
width="100%"
height="100%" x="0" y="0"/>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<components:VirtualKeyboard x="325" y="770" KeyClicked="HandleKeyEvent(event)"/>
</s:WindowedApplication>
Main-app.aml
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/2.5">
<!-- Adobe AIR Application Descriptor File Template.
Specifies parameters for identifying, installing, and launching AIR applications.
xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/2.5
The last segment of the namespace specifies the version
of the AIR runtime required for this application to run.
minimumPatchLevel - The minimum patch level of the AIR runtime required to run
the application. Optional.
-->
<!-- A universally unique application identifier. Must be unique across all AIR applications.
Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
<id>Main</id>
<!-- Used as the filename for the application. Required. -->
<filename>Virtual Keyboard</filename>
<!-- The name that is displayed in the AIR application installer.
May have multiple values for each language. See samples or xsd schema file. Optional. -->
<name></name>
<!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade.
Values can also be 1-part or 2-part. It is not necessary to have a 3-part value.
An updated version of application must have a versionNumber value higher than the previous version. Required for namespace >= 2.5 . -->
<versionNumber>1.0.0</versionNumber>
<!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. -->
<!-- <versionLabel></versionLabel> -->
<!-- Description, displayed in the AIR application installer.
May have multiple values for each language. See samples or xsd schema file. Optional. -->
<!-- <description></description> -->
<!-- Copyright information. Optional -->
<!-- <copyright></copyright> -->
<!-- Publisher ID. Used if you're updating an application created prior to 1.5.3 -->
<!-- <publisherID></publisherID> -->
<!-- Settings for the application's initial window. Required. -->
<initialWindow>
<!-- The main SWF or HTML file of the application. Required. -->
<!-- Note: In Flash Builder, the SWF reference is set automatically. -->
<content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
<!-- The title of the main window. Optional. -->
<!-- <title></title> -->
<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
<systemChrome>none</systemChrome>
<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
<transparent>false</transparent>
<!-- Whether the window is initially visible. Optional. Default false. -->
<visible>false</visible>
<!-- Whether the user can minimize the window. Optional. Default true. -->
<minimizable>false</minimizable>
<!-- Whether the user can maximize the window. Optional. Default true. -->
<maximizable>false</maximizable>
<!-- Whether the user can resize the window. Optional. Default true. -->
<resizable>false</resizable>
<!-- The window's initial width in pixels. Optional. -->
<width>1280</width>
<!-- The window's initial height in pixels. Optional. -->
<height>1024</height>
<!-- The window's initial x position. Optional. -->
<!-- <x></x> -->
<!-- The window's initial y position. Optional. -->
<!-- <y></y> -->
<!-- The window's minimum size, specified as a width/height pair in pixels, such as "400 200". Optional. -->
<minSize>1280 1024</minSize>
<!-- <minSize>1024 768</minSize> -->
<!-- The window's initial maximum size, specified as a width/height pair in pixels, such as "1600 1200". Optional. -->
<maxSize>1280 1024</maxSize>
<!-- <maxSize>1024 768</maxSize> -->
</initialWindow>
<!-- We recommend omitting the supportedProfiles element, -->
<!-- which in turn permits your application to be deployed to all -->
<!-- devices supported by AIR. If you wish to restrict deployment -->
<!-- (i.e., to only mobile devices) then add this element and list -->
<!-- only the profiles which your application does support. -->
<!-- <supportedProfiles>desktop extendedDesktop mobileDevice extendedMobileDevice</supportedProfiles> -->
<!-- The subpath of the standard default installation location to use. Optional. -->
<!-- <installFolder></installFolder> -->
<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
<!-- <programMenuFolder></programMenuFolder> -->
<!-- The icon the system uses for the application. For at least one resolution,
specify the path to a PNG file included in the AIR package. Optional. -->
<!-- <icon>
<image16x16></image16x16>
<image32x32></image32x32>
<image36x36></image36x36>
<image48x48></image48x48>
<image72x72></image72x72>
<image128x128></image128x128>
</icon> -->
<!-- Whether the application handles the update when a user double-clicks an update version
of the AIR file (true), or the default AIR application installer handles the update (false).
Optional. Default false. -->
<!-- <customUpdateUI></customUpdateUI> -->
<!-- Whether the application can be launched when the user clicks a link in a web browser.
Optional. Default false. -->
<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
<!-- Listing of file types for which the application can register. Optional. -->
<!-- <fileTypes> -->
<!-- Defines one file type. Optional. -->
<!-- <fileType> -->
<!-- The name that the system displays for the registered file type. Required. -->
<!-- <name></name> -->
<!-- The extension to register. Required. -->
<!-- <extension></extension> -->
<!-- The description of the file type. Optional. -->
<!-- <description></description> -->
<!-- The MIME content type. -->
<!-- <contentType></contentType> -->
<!-- The icon to display for the file type. Optional. -->
<!-- <icon>
<image16x16></image16x16>
<image32x32></image32x32>
<image48x48></image48x48>
<image128x128></image128x128>
</icon> -->
<!-- </fileType> -->
<!-- </fileTypes> -->
<!-- Specify Android specific tags that get passed to AndroidManifest.xml file. -->
<!--<android>
<manifestAdditions>
<![CDATA[
<manifest android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-configuration android:reqFiveWayNav="true"/>
<supports-screens android:normalScreens="true"/>
<uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/>
<application android:enabled="true">
<activity android:excludeFromRecents="false">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
]]>
</manifestAdditions>
</android> -->
<!-- End of the schema for adding the android specific tags in AndroidManifest.xml file -->
</application>
VirtualKeyboardEvent.as
package com.uibuzz.events
import flash.events.Event;
public class VirtualKeyboardEvent extends Event
public var keyLabel:String;
public function VirtualKeyboardEvent(type:String)
super(type);
override public function clone():Event
var eventObj:VirtualKeyboardEvent = new VirtualKeyboardEvent(type);
eventObj.keyLabel = this.keyLabel;
return eventObj;
VirtualKeyboard.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
width="610" height="215" currentState="Lowercase">
<s:layout>
<s:BasicLayout/>
</s:layout>
<fx:Metadata>
[Event(name="KeyClicked", type="com.uibuzz.events.VirtualKeyboardEvent")]
</fx:Metadata>
<fx:Script>
<![CDATA[
import com.uibuzz.events.VirtualKeyboardEvent;
protected function handleShiftButton(event:MouseEvent):void
if (this.currentState == "Lowercase")
this.currentState = "Uppercase";
else
this.currentState = "Lowercase";
protected function handleButtonClick(event:MouseEvent):void
var e:VirtualKeyboardEvent = new VirtualKeyboardEvent("KeyClicked");
e.keyLabel = event.currentTarget.label;
dispatchEvent(e);
]]>
</fx:Script>
<s:states>
<s:State name="Lowercase"/>
<s:State name="Uppercase"/>
</s:states>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Button id="btn1" x="50" y="10" width="32" height="32" label="1"
click="handleButtonClick(event)"
label.Uppercase="!"/>
<s:Button id="btnTilde" x="10" y="10" width="32" height="32" label="`"
click="handleButtonClick(event)"
label.Uppercase="~"/>
<s:Button id="btn2" x="90" y="10" width="32" height="32" label="2"
click="handleButtonClick(event)"
label.Uppercase="@" fontSize.Uppercase="11"/>
<s:Button id="btn3" x="130" y="10" width="32" height="32" label="3"
click="handleButtonClick(event)"
label.Uppercase="#"/>
<s:Button id="btn4" x="170" y="10" width="32" height="32" label="4"
click="handleButtonClick(event)"
label.Uppercase="$"/>
<s:Button id="btn5" x="210" y="10" width="32" height="32" label="5"
click="handleButtonClick(event)"
label.Uppercase="%"/>
<s:Button id="btn6" x="250" y="10" width="32" height="32" label="6"
click="handleButtonClick(event)"
label.Uppercase="^"/>
<s:Button id="btn7" x="290" y="10" width="32" height="32" label="7"
click="handleButtonClick(event)"
label.Uppercase="&"/>
<s:Button id="btn8" x="330" y="10" width="32" height="32" label="8"
click="handleButtonClick(event)"
label.Uppercase="*"/>
<s:Button id="btn9" x="370" y="10" width="32" height="32" label="9"
click="handleButtonClick(event)"
label.Uppercase="("/>
<s:Button id="btn0" x="410" y="10" width="32" height="32" label="0"
click="handleButtonClick(event)"
label.Uppercase=")"/>
<s:Button id="btnMinus" x="450" y="10" width="32" height="32" label="-"
click="handleButtonClick(event)"
label.Uppercase="_"/>
<s:Button id="btnEquals" x="490" y="10" width="32" height="32" label="="
click="handleButtonClick(event)"
label.Uppercase="+"/>
<s:Button id="btnDelete" x="530" y="10" width="70" height="32" label="Delete" click="handleButtonClick(event)"/>
<s:Button id="btnEnter" x="530" y="90" width="70" height="32" label="Enter" click="handleButtonClick(event)"/>
<s:Button id="btnRightShift" x="510" y="130" width="70" height="32" label="Shift"
click="handleShiftButton(event)"/>
<s:Button id="btnLeftShift" x="30" y="130" width="70" height="32" label="Shift"
click="handleShiftButton(event)"/>
<s:Button id="btnTab" x="10" y="50" width="50" height="32" label="Tab" click="handleButtonClick(event)"/>
<s:Button id="btnQ" x="70" y="50" width="32" height="32" label="q"
click="handleButtonClick(event)"
label.Uppercase="Q"/>
<s:Button id="btnW" x="110" y="50" width="32" height="32" label="w"
click="handleButtonClick(event)"
label.Uppercase="W"/>
<s:Button id="btnE" x="150" y="50" width="32" height="32" label="e"
click="handleButtonClick(event)"
label.Uppercase="E"/>
<s:Button id="btnR" x="190" y="50" width="32" height="32" label="r"
click="handleButtonClick(event)"
label.Uppercase="R"/>
<s:Button id="btnT" x="230" y="50" width="32" height="32" label="t"
click="handleButtonClick(event)"
label.Uppercase="T"/>
<s:Button id="btnY" x="270" y="50" width="32" height="32" label="y"
click="handleButtonClick(event)"
label.Uppercase="Y"/>
<s:Button id="btnU" x="310" y="50" width="32" height="32" label="u"
click="handleButtonClick(event)"
label.Uppercase="U"/>
<s:Button id="btnI" x="350" y="50" width="32" height="32" label="i"
click="handleButtonClick(event)"
label.Uppercase="I"/>
<s:Button id="btnO" x="390" y="50" width="32" height="32" label="o"
click="handleButtonClick(event)"
label.Uppercase="O"/>
<s:Button id="btnP" x="430" y="50" width="32" height="32" label="p"
click="handleButtonClick(event)"
label.Uppercase="P"/>
<s:Button id="btnLeftBracket" x="470" y="50" width="32" height="32" label="["
click="handleButtonClick(event)"
label.Uppercase="{"/>
<s:Button id="btnRightBracket" x="510" y="50" width="32" height="32" label="]"
click="handleButtonClick(event)"
label.Uppercase="}"/>
<s:Button id="btnBackSlash" x="550" y="50" width="32" height="32" label="\"
click="handleButtonClick(event)"
label.Uppercase="|"/>
<s:Button id="btnA" x="90" y="90" width="32" height="32" label="a"
click="handleButtonClick(event)"
label.Uppercase="A"/>
<s:Button id="btnS" x="130" y="90" width="32" height="32" label="s"
click="handleButtonClick(event)"
label.Uppercase="S"/>
<s:Button id="btnD" x="170" y="90" width="32" height="32" label="d"
click="handleButtonClick(event)"
label.Uppercase="D"/>
<s:Button id="btnF" x="210" y="90" width="32" height="32" label="f"
click="handleButtonClick(event)"
label.Uppercase="F"/>
<s:Button id="btnG" x="250" y="90" width="32" height="32" label="g"
click="handleButtonClick(event)"
label.Uppercase="G"/>
<s:Button id="btnH" x="290" y="90" width="32" height="32" label="h"
click="handleButtonClick(event)"
label.Uppercase="H"/>
<s:Button id="btnJ" x="330" y="90" width="32" height="32" label="j"
click="handleButtonClick(event)"
label.Uppercase="J"/>
<s:Button id="btnK" x="370" y="90" width="32" height="32" label="k"
click="handleButtonClick(event)"
label.Uppercase="K"/>
<s:Button id="btnL" x="410" y="90" width="32" height="32" label="l"
click="handleButtonClick(event)"
label.Uppercase="L"/>
<s:Button id="btnSemiColon" x="450" y="90" width="32" height="32" label=";"
click="handleButtonClick(event)"
label.Uppercase=":"/>
<s:Button id="btnQuote" x="490" y="90" width="32" height="32" label="'"
click="handleButtonClick(event)"
label.Uppercase="""/>
<s:Button id="btnZ" x="110" y="130" width="32" height="32" label="z"
click="handleButtonClick(event)"
label.Uppercase="Z"/>
<s:Button id="btnX" x="150" y="130" width="32" height="32" label="x"
click="handleButtonClick(event)"
label.Uppercase="X"/>
<s:Button id="btnC" x="190" y="130" width="32" height="32" label="c"
click="handleButtonClick(event)"
label.Uppercase="C"/>
<s:Button id="btnV" x="230" y="130" width="32" height="32" label="v"
click="handleButtonClick(event)"
label.Uppercase="V"/>
<s:Button id="btnB" x="270" y="130" width="32" height="32" label="b"
click="handleButtonClick(event)"
label.Uppercase="B"/>
<s:Button id="btnSpace" x="150" y="170" width="272" height="32" label="Space" click="handleButtonClick(event)"/>
<s:Button id="btnN" x="310" y="130" width="32" height="32" label="n"
click="handleButtonClick(event)"
label.Uppercase="N"/>
<s:Button id="btnM" x="350" y="130" width="32" height="32" label="m"
click="handleButtonClick(event)"
label.Uppercase="M"/>
<s:Button id="btnComma" x="390" y="130" width="32" height="32" label=","
click="handleButtonClick(event)"
label.Uppercase="<"/>
<s:Button id="btnStop" x="430" y="130" width="32" height="32" label="."
click="handleButtonClick(event)"
label.Uppercase=">"/>
<s:Button id="btnForwardSlash" x="470" y="130" width="32" height="32" label="/"
click="handleButtonClick(event)"
label.Uppercase="?"/>
</s:Group>I have created a simple Adobe Air Windowed Application. The application uses the mx:HTML controls to load a web page inside my application. I have tried other means to load the web page but due to formatting issue, all other methods fail to load the page correctly. Any solution will need to use the mx HTML controls.
I have added a virtual keyboard to my project. However, when I enter a text field and then select a key on the virtual keyboard, I lose focus on the text field.
I understand the concept of event listeners and using a variable to store the text field id and using a focus event to gain the id of the text field. However, I am not a programmer by no means and this is way above my head. I am looking for someone to spend 30 or 60 minutes adding the needed code to my project so I can use the virtual keyboard. I would be willing to send someone a gift card to their favorite restaurant as compensation.
I have included the 4 files that make up my project (File names are in read text).
Your help will be greatly appreciated.
Best regards,
Joe
Main.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:components="com.uibuzz.components.*"
xmlns:local="*"
xmlns:keyboard=".*"
xmlns:panel=".*"
showStatusBar="false"
alwaysInFront="true"
creationComplete="RunFunction(event)">
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
protected function RunFunction(event:FlexEvent):void
nativeWindow.x = (Capabilities.screenResolutionX - nativeWindow.width) / 2;
nativeWindow.y = (Capabilities.screenResolutionY - nativeWindow.height) / 2;
// Mouse.hide();
html.location = 'https://google.com';
]]>
</fx:Script>
<fx:Script>
<![CDATA[
// Virtual Keyboard
import com.uibuzz.events.VirtualKeyboardEvent;
protected function HandleKeyEvent(event:VirtualKeyboardEvent):void
trace("Key pressed: " + event.keyLabel);
]]>
</fx:Script>
<mx:HTML id="html"
paintsDefaultBackground="false"
width="100%"
height="100%" x="0" y="0"/>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<components:VirtualKeyboard x="325" y="770" KeyClicked="HandleKeyEvent(event)"/>
</s:WindowedApplication>
Main-app.aml
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/2.5">
<!-- Adobe AIR Application Descriptor File Template.
Specifies parameters for identifying, installing, and launching AIR applications.
xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/2.5
The last segment of the namespace specifies the version
of the AIR runtime required for this application to run.
minimumPatchLevel - The minimum patch level of the AIR runtime required to run
the application. Optional.
-->
<!-- A universally unique application identifier. Must be unique across all AIR applications.
Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
<id>Main</id>
<!-- Used as the filename for the application. Required. -->
<filename>Virtual Keyboard</filename>
<!-- The name that is displayed in the AIR application installer.
May have multiple values for each language. See samples or xsd schema file. Optional. -->
<name></name>
<!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade.
Values can also be 1-part or 2-part. It is not necessary to have a 3-part value.
An updated version of application must have a versionNumber value higher than the previous version. Required for namespace >= 2.5 . -->
<versionNumber>1.0.0</versionNumber>
<!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. -->
<!-- <versionLabel></versionLabel> -->
<!-- Description, displayed in the AIR application installer.
May have multiple values for each language. See samples or xsd schema file. Optional. -->
<!-- <description></description> -->
<!-- Copyright information. Optional -->
<!-- <copyright></copyright> -->
<!-- Publisher ID. Used if you're updating an application created prior to 1.5.3 -->
<!-- <publisherID></publisherID> -->
<!-- Settings for the application's initial window. Required. -->
<initialWindow>
<!-- The main SWF or HTML file of the application. Required. -->
<!-- Note: In Flash Builder, the SWF reference is set automatically. -->
<content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
<!-- The title of the main window. Optional. -->
<!-- <title></title> -->
<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
<systemChrome>none</systemChrome>
<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
<transparent>false</transparent>
<!-- Whether the window is initially visible. Optional. Default false. -->
<visible>false</visible>
<!-- Whether the user can minimize the window. Optional. Default true. -->
<minimizable>false</minimizable>
<!-- Whether the user can maximize the window. Optional. Default true. -->
<maximizable>false</maximizable>
<!-- Whether the user can resize the window. Optional. Default true. -->
<resizable>false</resizable>
<!-- The window's initial width in pixels. Optional. -->
<width>1280</width>
<!-- The window's initial height in pixels. Optional. -->
<height>1024</height>
<!-- The window's initial x position. Optional. -->
<!-- <x></x> -->
<!-- The window's initial y position. Optional. -->
<!-- <y></y> -->
<!-- The window's minimum size, specified as a width/height pair in pixels, such as "400 200". Optional. -->
<minSize>1280 1024</minSize>
<!-- <minSize>1024 768</minSize> -->
<!-- The window's initial maximum size, specified as a width/height pair in pixels, such as "1600 1200". Optional. -->
<maxSize>1280 1024</maxSize>
<!-- <maxSize>1024 768</maxSize> -->
</initialWindow>
<!-- We recommend omitting the supportedProfiles element, -->
<!-- which in turn permits your application to be deployed to all -->
<!-- devices supported by AIR. If you wish to restrict deployment -->
<!-- (i.e., to only mobile devices) then add this element and list -->
<!-- only the profiles which your application does support. -->
<!-- <supportedProfiles>desktop extendedDesktop mobileDevice extendedMobileDevice</supportedProfiles> -->
<!-- The subpath of the standard default installation location to use. Optional. -->
<!-- <installFolder></installFolder> -->
<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
<!-- <programMenuFolder></programMenuFolder> -->
<!-- The icon the system uses for the application. For at least one resolution,
specify the path to a PNG file included in the AIR package. Optional. -->
<!-- <icon>
<image16x16></image16x16>
<image32x32></image32x32>
<image36x36></image36x36>
<image48x48></image48x48>
<image72x72></image72x72>
<image128x128></image128x128>
</icon> -->
<!-- Whether the application handles the update when a user double-clicks an update version
of the AIR file (true), or the default AIR application installer handles the update (false).
Optional. Default false. -->
<!-- <customUpdateUI></customUpdateUI> -->
<!-- Whether the application can be launched when the user clicks a link in a web browser.
Optional. Default false. -->
<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
<!-- Listing of file types for which the application can register. Optional. -->
<!-- <fileTypes> -->
<!-- Defines one file type. Optional. -->
<!-- <fileType> -->
<!-- The name that the system displays for the registered file type. Required. -->
<!-- <name></name> -->
<!-- The extension to register. Required. -->
<!-- <extension></extension> -->
<!-- The description of the file type. Optional. -->
<!-- <description></description> -->
<!-- The MIME content type. -->
<!-- <contentType></contentType> -->
<!-- The icon to display for the file type. Optional. -->
<!-- <icon>
<image16x16></image16x16>
<image32x32></image32x32>
<image48x48></image48x48>
<image128x128></image128x128>
</icon> -->
<!-- </fileType> -->
<!-- </fileTypes> -->
<!-- Specify Android specific tags that get passed to AndroidManifest.xml file. -->
<!--<android>
<manifestAdditions>
<![CDATA[
<manifest android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-configuration android:reqFiveWayNav="true"/>
<supports-screens android:normalScreens="true"/>
<uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/>
<application android:enabled="true">
<activity android:excludeFromRecents="false">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
]]>
</manifestAdditions>
</android> -->
<!-- End of the schema for adding the android specific tags in AndroidManifest.xml file -->
</application>
VirtualKeyboardEvent.as
package com.uibuzz.events
import flash.events.Event;
public class VirtualKeyboardEvent extends Event
public var keyLabel:String;
public function VirtualKeyboardEvent(type:String)
super(type);
override public function clone():Event
var eventObj:VirtualKeyboardEvent = new VirtualKeyboardEvent(type);
eventObj.keyLabel = this.keyLabel;
return eventObj;
VirtualKeyboard.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
width="610" height="215" currentState="Lowercase">
<s:layout>
<s:BasicLayout/>
</s:layout>
<fx:Metadata>
[Event(name="KeyClicked", type="com.uibuzz.events.VirtualKeyboardEvent")]
</fx:Metadata>
<fx:Script>
<![CDATA[
import com.uibuzz.events.VirtualKeyboardEvent;
protected function handleShiftButton(event:MouseEvent):void
if (this.currentState == "Lowercase")
this.currentState = "Uppercase";
else
this.currentState = "Lowercase";
protected function handleButtonClick(event:MouseEvent):void
var e:VirtualKeyboardEvent = new VirtualKeyboardEvent("KeyClicked");
e.keyLabel = event.currentTarget.label;
dispatchEvent(e);
]]>
</fx:Script>
<s:states>
<s:State name="Lowercase"/>
<s:State name="Uppercase"/>
</s:states>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Button id="btn1" x="50" y="10" width="32" height="32" label="1"
click="handleButtonClick(event)"
label.Uppercase="!"/>
<s:Button id="btnTilde" x="10" y="10" width="32" height="32" label="`"
click="handleButtonClick(event)"
label.Uppercase="~"/>
<s:Button id="btn2" x="90" y="10" width="32" height="32" label="2"
click="handleButtonClick(event)"
label.Uppercase="@" fontSize.Uppercase="11"/>
<s:Button id="btn3" x="130" y="10" width="32" height="32" label="3"
click="handleButtonClick(event)"
label.Uppercase="#"/>
<s:Button id="btn4" x="170" y="10" width="32" height="32" label="4"
click="handleButtonClick(event)"
label.Uppercase="$"/>
<s:Button id="btn5" x="210" y="10" width="32" height="32" label="5"
click="handleButtonClick(event)"
label.Uppercase="%"/>
<s:Button id="btn6" x="250" y="10" width="32" height="32" label="6"
click="handleButtonClick(event)"
label.Uppercase="^"/>
<s:Button id="btn7" x="290" y="10" width="32" height="32" label="7"
click="handleButtonClick(event)"
label.Uppercase="&"/>
<s:Button id="btn8" x="330" y="10" width="32" height="32" label="8"
click="handleButtonClick(event)"
label.Uppercase="*"/>
<s:Button id="btn9" x="370" y="10" width="32" height="32" label="9"
click="handleButtonClick(event)"
label.Uppercase="("/>
<s:Button id="btn0" x="410" y="10" width="32" height="32" label="0"
click="handleButtonClick(event)"
label.Uppercase=")"/>
<s:Button id="btnMinus" x="450" y="10" width="32" height="32" label="-"
click="handleButtonClick(event)"
label.Uppercase="_"/>
<s:Button id="btnEquals" x="490" y="10" width="32" height="32" label="="
click="handleButtonClick(event)"
label.Uppercase="+"/>
<s:Button id="btnDelete" x="530" y="10" width="70" height="32" label="Delete" click="handleButtonClick(event)"/>
<s:Button id="btnEnter" x="530" y="90" width="70" height="32" label="Enter" click="handleButtonClick(event)"/>
<s:Button id="btnRightShift" x="510" y="130" width="70" height="32" label="Shift"
click="handleShiftButton(event)"/>
<s:Button id="btnLeftShift" x="30" y="130" width="70" height="32" label="Shift"
click="handleShiftButton(event)"/>
<s:Button id="btnTab" x="10" y="50" width="50" height="32" label="Tab" click="handleButtonClick(event)"/>
<s:Button id="btnQ" x="70" y="50" width="32" height="32" label="q"
click="handleButtonClick(event)"
label.Uppercase="Q"/>
<s:Button id="btnW" x="110" y="50" width="32" height="32" label="w"
click="handleButtonClick(event)"
label.Uppercase="W"/>
<s:Button id="btnE" x="150" y="50" width="32" height="32" label="e"
click="handleButtonClick(event)"
label.Uppercase="E"/>
<s:Button id="btnR" x="190" y="50" width="32" height="32" label="r"
click="handleButtonClick(event)"
label.Uppercase="R"/>
<s:Button id="btnT" x="230" y="50" width="32" height="32" label="t"
click="handleButtonClick(event)"
label.Uppercase="T"/>
<s:Button id="btnY" x="270" y="50" width="32" height="32" label="y"
click="handleButtonClick(event)"
label.Uppercase="Y"/>
<s:Button id="btnU" x="310" y="50" width="32" height="32" label="u"
click="handleButtonClick(event)"
label.Uppercase="U"/>
<s:Button id="btnI" x="350" y="50" width="32" height="32" label="i"
click="handleButtonClick(event)"
label.Uppercase="I"/>
<s:Button id="btnO" x="390" y="50" width="32" height="32" label="o"
click="handleButtonClick(event)"
label.Uppercase="O"/>
<s:Button id="btnP" x="430" y="50" width="32" height="32" label="p"
click="handleButtonClick(event)"
label.Uppercase="P"/>
<s:Button id="btnLeftBracket" x="470" y="50" width="32" height="32" label="["
click="handleButtonClick(event)"
label.Uppercase="{"/>
<s:Button id="btnRightBracket" x="510" y="50" width="32" height="32" label="]"
click="handleButtonClick(event)"
label.Uppercase="}"/>
<s:Button id="btnBackSlash" x="550" y="50" width="32" height="32" label="\"
click="handleButtonClick(event)"
label.Uppercase="|"/>
<s:Button id="btnA" x="90" y="90" width="32" height="32" label="a"
click="handleButtonClick(event)"
label.Uppercase="A"/>
<s:Button id="btnS" x="130" y="90" width="32" height="32" label="s"
click="handleButtonClick(event)"
label.Uppercase="S"/>
<s:Button id="btnD" x="170" y="90" width="32" height="32" label="d"
click="handleButtonClick(event)"
label.Uppercase="D"/>
<s:Button id="btnF" x="210" y="90" width="32" height="32" label="f"
click="handleButtonClick(event)"
label.Uppercase="F"/>
<s:Button id="btnG" x="250" y="90" width="32" height="32" label="g"
click="handleButtonClick(event)"
label.Uppercase="G"/>
<s:Button id="btnH" x="290" y="90" width="32" height="32" label="h"
click="handleButtonClick(event)"
label.Uppercase="H"/>
<s:Button id="btnJ" x="330" y="90" width="32" height="32" label="j"
click="handleButtonClick(event)"
label.Uppercase="J"/>
<s:Button id="btnK" x="370" y="90" width="32" height="32" label="k"
click="handleButtonClick(event)"
label.Uppercase="K"/>
<s:Button id="btnL" x="410" y="90" width="32" height="32" label="l"
click="handleButtonClick(event)"
label.Uppercase="L"/>
<s:Button id="btnSemiColon" x="450" y="90" width="32" height="32" label=";"
click="handleButtonClick(event)"
label.Uppercase=":"/>
<s:Button id="btnQuote" x="490" y="90" width="32" height="32" label="'"
click="handleButtonClick(event)"
label.Uppercase="""/>
<s:Button id="btnZ" x="110" y="130" width="32" height="32" label="z"
click="handleButtonClick(event)"
label.Uppercase="Z"/>
<s:Button id="btnX" x="150" y="130" width="32" height="32" label="x"
click="handleButtonClick(event)"
label.Uppercase="X"/>
<s:Button id="btnC" x="190" y="130" width="32" height="32" label="c"
click="handleButtonClick(event)"
label.Uppercase="C"/>
<s:Button id="btnV" x="230" y="130" width="32" height="32" label="v"
click="handleButtonClick(event)"
label.Uppercase="V"/>
<s:Button id="btnB" x="270" y="130" width="32" height="32" label="b"
click="handleButtonClick(event)"
label.Uppercase="B"/>
<s:Button id="btnSpace" x="150" y="170" width="272" height="32" label="Space" click="handleButtonClick(event)"/>
<s:Button id="btnN" x="310" y="130" width="32" height="32" label="n"
click="handleButtonClick(event)"
label.Uppercase="N"/>
<s:Button id="btnM" x="350" y="130" width="32" height="32" label="m"
click="handleButtonClick(event)"
label.Uppercase="M"/>
<s:Button id="btnComma" x="390" y="130" width="32" height="32" label=","
click="handleButtonClick(event)"
label.Uppercase="<"/>
<s:Button id="btnStop" x="430" y="130" width="32" height="32" label="."
click="handleButtonClick(event)"
label.Uppercase=">"/>
<s:Button id="btnForwardSlash" x="470" y="130" width="32" height="32" label="/"
click="handleButtonClick(event)"
label.Uppercase="?"/>
</s:Group> -
Problem when using cloudscape on JBoss
Hi All,
I try to run Petstore 1.3.2 on JBoss 3.2.3. I used a patch for Petstore 1.3.2 to run on JBoss 3.0.1 RC1. I tested, this patch works on 3.0.1 well. Using database cloudscape, provided by j2eesdk 1.3.1.
But it doesnt work in 3.2.3.
link to the patch and doc:
http://docs.huihoo.com/jboss/petstore.html
I changed two things of JBoss 3.2.3:
First, I changed "C:\jboss-3.2.3\server\default\conf\login-config.xml"
add following lines into it:
Code:
<application-policy name = "CloudscapeDbRealm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
<module-option name = "principal"></module-option>
<module-option name = "userName">estoreuser</module-option>
<module-option name = "password">estore</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=EstoreDataSource</module-option>
</login-module>
</authentication>
</application-policy>
<application-policy name = "CloudscapeDbRealmInventory">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
<module-option name = "principal"></module-option>
<module-option name = "userName">estoreuser</module-option>
<module-option name = "password">estore</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=InventoryDataSource</module-option>
</login-module>
</authentication>
</application-policy> --------------------------------------------------------------------
Second, I copy a file called "cloudscape-service.xml" into "C:\jboss-3.2.3\server\default\deploy"
The content of this file:
<server>
<mbean code="org.jboss.resource.connectionmanager.LocalTxConnectionManager" name="jboss.jca:service=LocalTxCM,name=EstoreDataSource">
<attribute name="SecurityDomainJndiName">CloudscapeDbRealm</attribute>
<depends optional-attribute-name="ManagedConnectionFactoryName">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=EstoreDataSource"> <!--DS-->
<attribute name="JndiName">EstoreDB</attribute>
<attribute name="ManagedConnectionFactoryProperties">
<properties>
<config-property name="ConnectionURL" type="java.lang.String">jdbc:rmi://localhost:1099/jdbc:cloudscape:EstoreDB;create=true</config-property>
<config-property name="DriverClass" type="java.lang.String">COM.cloudscape.core.RmiJdbcDriver</config-property>
<!--set these only if you want only default logins, not through JAAS -->
<config-property name="UserName" type="java.lang.String">estoreuser</config-property>
<config-property name="Password" type="java.lang.String">estore</config-property>
</properties>
</attribute>
<!--hack-->
<depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper</depends>
</mbean>
</depends>
<depends optional-attribute-name="ManagedConnectionPool">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=EstoreDataSource">
<attribute name="MinSize">0</attribute>
<attribute name="MaxSize">50</attribute>
<attribute name="BlockingTimeoutMillis">5000</attribute>
<attribute name="IdleTimeoutMinutes">15</attribute>
<attribute name="Criteria">ByContainer</attribute>
</mbean>
</depends>
<depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
<depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
<attribute name="TransactionManager">java:/TransactionManager</attribute>
<!--make the rar deploy! hack till better deployment-->
<depends>jboss.jca:service=RARDeployer</depends>
</mbean>
<mbean code="org.jboss.resource.connectionmanager.LocalTxConnectionManager" name="jboss.jca:service=LocalTxCM,name=InventoryDataSource">
<!--uncomment out this line if you are using the Informix DbRealm above -->
<attribute name="SecurityDomainJndiName">CloudscapeDbRealmInventory</attribute>
<depends optional-attribute-name="ManagedConnectionFactoryName">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=LocalTxDS,name=InventoryDataSource"> <!--DS-->
<attribute name="JndiName">InventoryDB</attribute>
<attribute name="ManagedConnectionFactoryProperties">
<properties>
<config-property name="ConnectionURL" type="java.lang.String">jdbc:rmi://localhost:1099/jdbc:cloudscape:EstoreDB;create=true</config-property>
<config-property name="DriverClass" type="java.lang.String">COM.cloudscape.core.RmiJdbcDriver</config-property>
<!--set these only if you want only default logins, not through JAAS -->
<config-property name="UserName" type="java.lang.String">estoreuser</config-property>
<config-property name="Password" type="java.lang.String">estore</config-property>
</properties>
</attribute>
<!--hack-->
<depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper</depends>
</mbean>
</depends>
<depends optional-attribute-name="ManagedConnectionPool">
<!--embedded mbean-->
<mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=LocalTxPool,name=InventoryDataSource">
<attribute name="MinSize">0</attribute>
<attribute name="MaxSize">50</attribute>
<attribute name="BlockingTimeoutMillis">5000</attribute>
<attribute name="IdleTimeoutMinutes">15</attribute>
<attribute name="Criteria">ByContainer</attribute>
</mbean>
</depends>
<depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
<depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
<attribute name="TransactionManager">java:/TransactionManager</attribute>
<!--make the rar deploy! hack till better deployment-->
<depends>jboss.jca:service=RARDeployer</depends>
</mbean>
</server>
(I started cloudscape.)
JBoss 3.2.3 seems has no problem with the modification of "login-config.xml".
However, JBoss 3.2.3 can't deploy "cloudscape-service.xml". It shows error msg when I start it:
12:22:18,140 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
Cause: Incomplete Deployment listing:
Packages waiting for a deployer:
Incompletely deployed packages:
MBeans waiting for classes:
MBeans waiting for other MBeans:
[ObjectName: jboss.jca:service=LocalTxCM,name=EstoreDataSource
state: FAILED
I Depend On: jboss.jca:service=LocalTxDS,name=EstoreDataSource
Depends On Me: org.jboss.deployment.DeploymentException: Exception setting attribute javax.management.Attribute: name=ManagedConnectionFactoryName value=jboss.
jca:service=LocalTxDS,name=EstoreDataSource on mbean jboss.jca:service=LocalTxCM,name=EstoreDataSource; - nested throwable: (javax.management.AttributeNotFoundException: Writable attribute 'ManagedConnectionFactoryName' not found), ObjectName: jboss.jca:service=LocalTxDS,name=EstoreDataSource
state: FAILED
I Depend On:
Depends On Me: jboss.jca:service=LocalTxCM,name=EstoreDataSource
org.jboss.deployment.DeploymentException: No Attribute found with name: JndiName, ObjectName:
jboss.jca:service=LocalTxCM,name=InventoryDataSource
state: FAILED
I Depend On: jboss.jca:service=LocalTxDS,name=InventoryDataSource
Depends On Me: org.jboss.deployment.DeploymentException: Exception setting attribute javax.management.Attribute: name=ManagedConnectionFactoryName value=jboss.
jca:service=LocalTxDS,name=InventoryDataSource on mbean jboss.jca:service=LocalTxCM,name=InventoryDataSource; - nested
throwable: (javax.management.AttributeNotFoundException: Writable attribute 'ManagedConnectionFactoryName' not found), ObjectName: jboss.jca:service=LocalTxDS,name=InventoryDataSource
state: FAILED
I Depend On:
Depends On Me: jboss.jca:service=LocalTxCM,name=InventoryDataSource
org.jboss.deployment.DeploymentException: No Attribute found with name: JndiName
The Petstore still can run, but shows "Unable to Connect to Database
Database Connection is closed: Confirm that you have started your database."
Could anyone kindly help with this problem, please?
The reason why I using 3.2.3 is the project I am working on need to use TPTP BTM to monitor Petstore.
But eclipse seems just support JBoss 3.2.3 and JBoss 4.0.
I have the same problem with JBoss 4.0.5 GA.
Thank you very much!Hi,
I am having the same issue with Siebel on Demand web services. I was wondering if you ever solved this issue??? -
Android, backspace doesn't work properly in a flash.text.TextField
Hello,
I have a bug on my Nexus 5 Android 4.4 Air 4.0.
when I scroll the text in the textField and I select the text (in my example near "subclass" word), the TextField get focus, if I put on the backspace key, the character deleted is the previous character the first time, and if I put again on the backspace key, the caracter deleted is the first character and not the previous character.
package{
import flash.text.TextField;
import flash.display.Sprite;
import flash.events.Event;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
public class Main extends Sprite {
private var myTextField:TextField = new TextField();
public function Main() {
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
addEventListener(Event.ADDED_TO_STAGE, init);
private function init(event:Event):void {
myTextField.type="input";
myTextField.text="The TextField class is used to create display objects for text display and input. You can give a text field an instance name in the Property inspector and use the methods and properties of the TextField class to manipulate it with ActionScript. TextField instance names are displayed in the Movie Explorer and in the Insert Target Path dialog box in the Actions panel.\nTo create a text field dynamically, use the TextField() constructor.\n\nThe methods of the TextField class let you set, select, and manipulate text in a dynamic or input text field that you create during authoring or at runtime.\n\nActionScript provides several ways to format your text at runtime. The TextFormat class lets you set character and paragraph formatting for TextField objects. You can apply Cascading Style Sheets (CSS) styles to text fields by using the TextField.styleSheet property and the StyleSheet class. You can use CSS to style built-in HTML tags, define new formatting tags, or apply styles. You can assign HTML formatted text, which optionally uses CSS styles, directly to a text field. HTML text that you assign to a text field can contain embedded media (movie clips, SWF files, GIF files, PNG files, and JPEG files). The text wraps around the embedded media in the same way that a web browser wraps text around media embedded in an HTML document.\n\nFlash Player supports a subset of HTML tags that you can use to format text. See the list of supported HTML tags in the description of the htmlText property.\n\nView the examples\n\nMore examples\n\nModifying the text field contents\nDisplaying HTML text\nUsing images in text fields\nScrolling text in a text field\nSelecting and manipulating text\nCapturing text input\nRestricting text input\nFormatting text\nWorking with static text\nTextField Example: Newspaper-style text formatting\nLearn more\n\nUse native features with a soft keyboard\nDisplay programming\nBasics of display programming\nCore display classes\nChoosing a DisplayObject subclass\nBasics of Working with text\nUsing the TextField class\nDisplaying text\nAdvanced text rendering\nRelated API Elements\n\nflash.text.TextFormat\nflash.text.StyleSheet\nhtmlText\n\nPublic Properties\n Show Inherited Public Properties\n Property Defined By\n alwaysShowSelection : Boolean\nWhen set to true and the text field is not in focus, Flash Player highlights the selection in the text field in gray.\nTextField\n antiAliasType : String\nThe type of anti-aliasing used for this text field.\nTextField\n autoSize : String\nControls automatic sizing and alignment of text fields.\nTextField\n background : Boolean\nSpecifies whether the text field has a background fill.\nTextField\n backgroundColor : uint\nThe color of the text field background.\nTextField\n border : Boolean\nSpecifies whether the text field has a border.\nTextField\n borderColor : uint\nThe color of the text field border.\nTextField\n bottomScrollV : int\n[read-only] An integer (1-based index) that indicates the bottommost line that is currently visible in the specified text field.\nTextField\n caretIndex : int\n[read-only] The index of the insertion point (caret) position.\nTextField\n condenseWhite : Boolean\nA Boolean value that specifies whether extra white space (spaces, line breaks, and so on) in a text field with HTML text is removed.\nTextField\n defaultTextFormat : flash.text:TextFormat\nSpecifies the format applied to newly inserted text, such as text entered by a user or text inserted with the replaceSelectedText() method.\nTextField\n displayAsPassword : Boolean\nSpecifies whether the text field is a password text field.\nTextField\n embedFonts : Boolean\nSpecifies whether to render by using embedded font outlines.\nTextField\n gridFitType : String\nThe type of grid fitting used for this text field.\nTextField\n htmlText : String\nContains the HTML representation of the text field contents.\nTextField\n length : int\n[read-only] The number of characters in a text field.\nTextField\n maxChars : int\nThe maximum number of characters that the text field can contain, as entered by a user.\nTextField\n maxScrollH : int\n[read-only] The maximum value of scrollH.\nTextField\n maxScrollV : int\n[read-only] The maximum value of scrollV.\nTextField\n mouseWheelEnabled : Boolean\nA Boolean value that indicates whether Flash Player automatically scrolls multiline text fields when the user clicks a text field and rolls the mouse wheel.\nTextField\n multiline : Boolean\nIndicates whether field is a multiline text field.\nTextField\n numLines : int\n[read-only] Defines the number of text lines in a multiline text field.\nTextField\n restrict : String\nIndicates the set of characters that a user can enter into the text field.\nTextField\n scrollH : int\nThe current horizontal scrolling position.\nTextField\n scrollV : int\nThe vertical position of text in a text field.\nTextField\n selectable : Boolean\nA Boolean value that indicates whether the text field is selectable.\nTextField\n selectionBeginIndex : int\n[read-only] The zero-based character index value of the first character in the current selection.\nTextField\n selectionEndIndex : int\n[read-only] The zero-based character index value of the last character in the current selection.\nTextField\n sharpness : Number\nThe sharpness of the glyph edges in this text field.\nTextField\n styleSheet : StyleSheet\nAttaches a style sheet to the text field.\nTextField\n text : String\nA string that is the current text in the text field.\nTextField\n textColor : uint\nThe color of the text in a text field, in hexadecimal format.\nTextField\n textHeight : Number\n[read-only] The height of the text in pixels.\nTextField\n textInteractionMode : String\n[read-only] The interaction mode property, Default value is TextInteractionMode.NORMAL.\nTextField\n textWidth : Number\n[read-only] The width of the text in pixels.\nTextField\n thickness : Number\nThe thickness of the glyph edges in this text field.\nTextField\n type : String\nThe type of the text field.\nTextField\n useRichTextClipboard : Boolean\nSpecifies whether to copy and paste the text formatting along with the text.\nTextField\n wordWrap : Boolean\nA Boolean value that indicates whether the text field has word wrap.\nTextField";
myTextField.border=true;
myTextField.width=myTextField.height=300;
addChild(myTextField);
Thanks.I have this bug on Galaxy Nexus Android 4.3, I don't have this bug on Galaxy S Android 2.3, the bug occurs with the new Google Keyboard 3.0
the app descriptor
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/4.0">
<!-- Adobe AIR Application Descriptor File Template.
Specifies parameters for identifying, installing, and launching AIR applications.
xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/3.5
The last segment of the namespace specifies the version
of the AIR runtime required for this application to run.
minimumPatchLevel - The minimum patch level of the AIR runtime required to run
the application. Optional.
-->
<!-- A universally unique application identifier. Must be unique across all AIR applications.
Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
<id>TextFieldFB</id>
<!-- Used as the filename for the application. Required. -->
<filename>TextFieldFB</filename>
<!-- The name that is displayed in the AIR application installer.
May have multiple values for each language. See samples or xsd schema file. Optional. -->
<name>TextFieldFB</name>
<!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade.
Values can also be 1-part or 2-part. It is not necessary to have a 3-part value.
An updated version of application must have a versionNumber value higher than the previous version. Required for namespace >= 2.5 . -->
<versionNumber>0.0.1</versionNumber>
<!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. -->
<!-- <versionLabel></versionLabel> -->
<!-- Description, displayed in the AIR application installer.
May have multiple values for each language. See samples or xsd schema file. Optional. -->
<!-- <description></description> -->
<!-- Copyright information. Optional -->
<!-- <copyright></copyright> -->
<!-- Publisher ID. Used if you're updating an application created prior to 1.5.3 -->
<!-- <publisherID></publisherID> -->
<!-- Settings for the application's initial window. Required. -->
<initialWindow>
<!-- The main SWF or HTML file of the application. Required. -->
<!-- Note: In Flash Builder, the SWF reference is set automatically. -->
<content>[Cette valeur sera remplacée par Flash Builder dans le fichier app.xml de sortie]</content>
<!-- The title of the main window. Optional. -->
<!-- <title></title> -->
<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
<!-- <systemChrome></systemChrome> -->
<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
<!-- <transparent></transparent> -->
<!-- Whether the window is initially visible. Optional. Default false. -->
<!-- <visible></visible> -->
<!-- Whether the user can minimize the window. Optional. Default true. -->
<!-- <minimizable></minimizable> -->
<!-- Whether the user can maximize the window. Optional. Default true. -->
<!-- <maximizable></maximizable> -->
<!-- Whether the user can resize the window. Optional. Default true. -->
<!-- <resizable></resizable> -->
<!-- The window's initial width in pixels. Optional. -->
<!-- <width></width> -->
<!-- The window's initial height in pixels. Optional. -->
<!-- <height></height> -->
<!-- The window's initial x position. Optional. -->
<!-- <x></x> -->
<!-- The window's initial y position. Optional. -->
<!-- <y></y> -->
<!-- The window's minimum size, specified as a width/height pair in pixels, such as "400 200". Optional. -->
<!-- <minSize></minSize> -->
<!-- The window's initial maximum size, specified as a width/height pair in pixels, such as "1600 1200". Optional. -->
<!-- <maxSize></maxSize> -->
<!-- The aspect ratio of the app ("portrait" or "landscape" or "any"). Optional. Mobile only. Default is the natural orientation of the device -->
<!-- <aspectRatio></aspectRatio> -->
<!-- Whether the app will begin auto-orienting on launch. Optional. Mobile only. Default false -->
<!-- <autoOrients></autoOrients> -->
<!-- Whether the app launches in full screen. Optional. Mobile only. Default false -->
<!-- <fullScreen></fullScreen> -->
<!-- The render mode for the app (either auto, cpu, gpu, or direct). Optional. Default auto -->
<!-- <renderMode></renderMode> -->
<!-- Whether the default direct mode rendering context allocates storage for depth and stencil buffers. Optional. Default false. -->
<!-- <depthAndStencil></depthAndStencil> -->
<!-- Whether or not to pan when a soft keyboard is raised or lowered (either "pan" or "none"). Optional. Defaults "pan." -->
<!-- <softKeyboardBehavior></softKeyboardBehavior> -->
<!-- Display Resolution for the app (either "standard" or "high"). Optional, OSX-only. Default "standard" -->
<!-- <requestedDisplayResolution></requestedDisplayResolution> -->
<autoOrients>true</autoOrients>
<fullScreen>false</fullScreen>
<visible>true</visible>
</initialWindow>
<!-- We recommend omitting the supportedProfiles element, -->
<!-- which in turn permits your application to be deployed to all -->
<!-- devices supported by AIR. If you wish to restrict deployment -->
<!-- (i.e., to only mobile devices) then add this element and list -->
<!-- only the profiles which your application does support. -->
<!-- <supportedProfiles>desktop extendedDesktop mobileDevice extendedMobileDevice</supportedProfiles> -->
<!-- Languages supported by application -->
<!-- Only these languages can be specified -->
<!-- <supportedLanguages>en de cs es fr it ja ko nl pl pt ru sv tr zh</supportedLanguages> -->
<!-- The subpath of the standard default installation location to use. Optional. -->
<!-- <installFolder></installFolder> -->
<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
<!-- <programMenuFolder></programMenuFolder> -->
<!-- The icon the system uses for the application. For at least one resolution,
specify the path to a PNG file included in the AIR package. Optional. -->
<!-- <icon>
<image16x16></image16x16>
<image29x29></image29x29>
<image32x32></image32x32>
<image36x36></image36x36>
<image40x40></image40x40>
<image48x48></image48x48>
<image50x50></image50x50>
<image57x57></image57x57>
<image58x58></image58x58>
<image72x72></image72x72>
<image76x76></image76x76>
<image80x80></image80x80>
<image96x96></image96x96>
<image100x100></image100x100>
<image114x114></image114x114>
<image120x120></image120x120>
<image128x128></image128x128>
<image144x144></image144x144>
<image152x152></image152x152>
<image512x512></image512x512>
<image732x412></image732x412>
<image1024x1024></image1024x1024>
</icon> -->
<!-- Whether the application handles the update when a user double-clicks an update version
of the AIR file (true), or the default AIR application installer handles the update (false).
Optional. Default false. -->
<!-- <customUpdateUI></customUpdateUI> -->
<!-- Whether the application can be launched when the user clicks a link in a web browser.
Optional. Default false. -->
<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
<!-- Listing of file types for which the application can register. Optional. -->
<!-- <fileTypes> -->
<!-- Defines one file type. Optional. -->
<!-- <fileType> -->
<!-- The name that the system displays for the registered file type. Required. -->
<!-- <name></name> -->
<!-- The extension to register. Required. -->
<!-- <extension></extension> -->
<!-- The description of the file type. Optional. -->
<!-- <description></description> -->
<!-- The MIME content type. -->
<!-- <contentType></contentType> -->
<!-- The icon to display for the file type. Optional. -->
<!-- <icon>
<image16x16></image16x16>
<image32x32></image32x32>
<image48x48></image48x48>
<image128x128></image128x128>
</icon> -->
<!-- </fileType> -->
<!-- </fileTypes> -->
<!-- iOS specific capabilities -->
<!-- <iPhone> -->
<!-- A list of plist key/value pairs to be added to the application Info.plist -->
<!-- <InfoAdditions>
<![CDATA[
<key>UIDeviceFamily</key>
<array>
<string>1</string>
<string>2</string>
</array>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleBlackOpaque</string>
<key>UIRequiresPersistentWiFi</key>
<string>YES</string>
]]>
</InfoAdditions> -->
<!-- A list of plist key/value pairs to be added to the application Entitlements.plist -->
<!-- <Entitlements>
<![CDATA[
<key>keychain-access-groups</key>
<array>
<string></string>
<string></string>
</array>
]]>
</Entitlements> -->
<!-- Display Resolution for the app (either "standard" or "high"). Optional. Default "standard" -->
<!-- <requestedDisplayResolution></requestedDisplayResolution> -->
<!-- Forcing Render Mode CPU for the devices mentioned. Optional -->
<!-- <forceCPURenderModeForDevices></forceCPURenderModeForDevices> -->
<!-- File containing line separated list of external swf paths. These swfs won't be
packaged inside the application and corresponding stripped swfs will be output in
externalStrippedSwfs folder. -->
<!-- <externalSwfs></externalSwfs> -->
<!-- </iPhone> -->
<!-- Specify Android specific tags that get passed to AndroidManifest.xml file. -->
<!--<android> -->
<!-- <manifestAdditions>
<![CDATA[
<manifest android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/>
<application android:enabled="true">
<activity android:excludeFromRecents="false">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
]]>
</manifestAdditions> -->
<!-- Color depth for the app (either "32bit" or "16bit"). Optional. Default 16bit before namespace 3.0, 32bit after -->
<!-- <colorDepth></colorDepth> -->
<!-- Indicates if the app contains video or not. Necessary for ordering of video planes with graphics plane, especially in Jellybean - if you app does video this must be set to true - valid values are true or false -->
<!-- <containsVideo></containsVideo> -->
<!-- </android> -->
<!-- End of the schema for adding the android specific tags in AndroidManifest.xml file -->
<android>
<manifestAdditions><![CDATA[
<manifest android:installLocation="auto">
<!--See the Adobe AIR documentation for more information about setting Google Android permissions-->
<!--La suppression de l’autorisation android.permission.INTERNET aura comme effet secondaire
de vous empêcher de déboguer l’application sur le périphérique.-->
<!--<uses-permission android:name="android.permission.INTERNET"/>-->
<!--<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>-->
<!--<uses-permission android:name="android.permission.READ_PHONE_STATE"/>-->
<!--<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>-->
<!--Les autorisations DISABLE_KEYGUARD et WAKE_LOCK doivent être permutées
afin d’accéder aux API SystemIdleMode d’AIR.-->
<!--<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>-->
<!--<uses-permission android:name="android.permission.WAKE_LOCK"/>-->
<!--<uses-permission android:name="android.permission.CAMERA"/>-->
<!--<uses-permission android:name="android.permission.RECORD_AUDIO"/>-->
<!--Les autorisations ACCESS_NETWORK_STATE et ACCESS_WIFI_STATE doivent être
permutées afin d’utiliser les API NetworkInfo d’AIR.-->
<!--<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>-->
<!--<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>-->
</manifest>
]]></manifestAdditions>
</android>
<iPhone>
<InfoAdditions><![CDATA[
<key>UIDeviceFamily</key>
<array>
<string>1</string>
<string>2</string>
</array>
]]></InfoAdditions>
<requestedDisplayResolution>high</requestedDisplayResolution>
</iPhone>
</application> -
Is it possible to create an extension containing a panel for Dreamweaver CC 2014?
Dear Adobe Community,
Currently we work in Dreamweaver CS6 with some custom extensions. Since we're now looking into upgrading to CC 2014, obviously, we need to make sure we can either re-use, port or create new extensions to maintain the functionality we have now.
In short: I haven't been able to create an extension for CC 2014 featuring a panel in any shape or form.
Creating a HTML5 based (CES 5) extension results in an error only visible in the log (attached).
Fiddling around in a flash based extension, upping the host application version gives no such error. But, like a HTML 5 based one, doesn't show up in Dreamweaver. (And I'm using the Sublime plugin, since Extension Builder 3 lacks DW support.)
Mind you, the "extensions" tab in the "Window" menu is lacking entirely.
Can anyone tell me if it is at all possible to create an extension for DW CC 2014?
Full log:
2014-09-01 16:11:24 : INFO PlugPlug version : 5.0.0.74
2014-09-01 16:11:24 : INFO LogLevel : 6
2014-09-01 16:11:24 : INFO Copy RGB Background Color Information for AppBar
2014-09-01 16:11:24 : INFO Fallback: Copy RGB Background Color Information for AppBar for sRGB usage
2014-09-01 16:11:24 : INFO Copy RGB Background Color Information for Panel
2014-09-01 16:11:24 : INFO Fallback: Copy RGB Background Color Information for Panel for sRGB usage
2014-09-01 16:11:24 : INFO Windows 32-bit PlugPlug logs
2014-09-01 16:11:24 : INFO ----------------------------
2014-09-01 16:11:24 : INFO PlugPlugSetup() API called:
2014-09-01 16:11:24 : INFO hostData->appName : DRWV
2014-09-01 16:11:24 : INFO hostData->appVersion : 14.0
2014-09-01 16:11:24 : INFO hostData->locale : en_US
2014-09-01 16:11:24 : INFO hostData->userInterfaceLocale : en_US
2014-09-01 16:11:24 : INFO hostData->supportedTypes : 31
2014-09-01 16:11:24 : INFO hostData->apeVersion : unknown
2014-09-01 16:11:24 : INFO hostData->overrideManifestLocation : (null)
2014-09-01 16:11:24 : INFO isApplicationOffline : false
2014-09-01 16:11:24 : INFO hostData->hostCEPHtmlEngineDirectory : (null)
2014-09-01 16:11:24 : INFO hostData->hostExtensionDirectory :C:\Users\BC-OLO\AppData\Roaming\Adobe\Dreamweaver CC 2014\en_US\Configuration\CEP\Extensions\
2014-09-01 16:11:24 : INFO hostData->hostStageManagerDirectory : C:\Program Files (x86)\Adobe\Adobe Dreamweaver CC 2014\Configuration\CEP\StageManager\
2014-09-01 16:11:24 : INFO hostData->imsLibPath: C:\Program Files (x86)\Common Files\Adobe\OOBE\PDApp\P7\IMSLib.dll
2014-09-01 16:11:24 : INFO skinInfo->baseFontSize : 10
2014-09-01 16:11:24 : INFO skinInfo->baseFontFamily : MS Shell Dlg 2
2014-09-01 16:11:24 : INFO skinInfo->appBarBackgroundColor->antialiasLevel : PlugPlugAntialiasLevel_None
2014-09-01 16:11:24 : INFO skinInfo->appBarBackgroundColor->type : PlugPlugColorType_RGB
2014-09-01 16:11:24 : INFO ExtensionRegistry started
2014-09-01 16:11:24 : INFO Found ExtensionManifest in cache: C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions\com.example.ext\csxs\manifest.xml
2014-09-01 16:11:24 : INFO Found ExtensionManifest in cache: C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions\com.OLO.Nemo\csxs\manifest.xml
2014-09-01 16:11:24 : INFO Searching for valid extensions in 'C:\Users\BC-OLO\AppData\Roaming\Adobe\Dreamweaver CC 2014\en_US\Configuration\CEP\Extensions\'
2014-09-01 16:11:24 : INFO Searching for valid extensions in 'C:\Program Files (x86)\Common Files\Adobe\CEP\extensions'
2014-09-01 16:11:24 : DEBUG Searching for valid extensions in 'C:\Program Files (x86)\Common Files\Adobe\CEP\extensions'
2014-09-01 16:11:24 : INFO Searching for valid extensions in 'C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions'
2014-09-01 16:11:24 : DEBUG Searching for valid extensions in 'C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions'
2014-09-01 16:11:24 : DEBUG ExtensionManifest in cache is still the same (C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions\com.example.ext\csxs\manifest.xml).
2014-09-01 16:11:24 : DEBUG ExtensionManifest in cache is still the same (C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions\com.OLO.Nemo\csxs\manifest.xml).
2014-09-01 16:11:24 : INFO ExtensionManifest 'C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions\com.example.ext\csxs\manifest.xml' contains '1' valid extensions for this host
2014-09-01 16:11:24 : INFO Found extension with id 'com.example.ext'
2014-09-01 16:11:24 : DEBUG -> BasePath : C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions\com.example.ext
2014-09-01 16:11:24 : DEBUG -> ExtensionBundleId : com.example.ext
2014-09-01 16:11:24 : DEBUG -> ExtensionBundleVersion : 1.0.0
2014-09-01 16:11:24 : DEBUG -> ID : com.example.ext
2014-09-01 16:11:24 : DEBUG -> Version : 1.0.0
2014-09-01 16:11:24 : DEBUG -> MainPath : C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions\com.example.ext\index.html
2014-09-01 16:11:24 : DEBUG -> ScriptPath : C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions\com.example.ext\jsx\hostscript.jsx
2014-09-01 16:11:24 : DEBUG -> ScriptEngineId : com.example.ext_Engine_Id
2014-09-01 16:11:24 : DEBUG -> AutoVisible : true
2014-09-01 16:11:24 : DEBUG -> StartOn -> Event : 0
2014-09-01 16:11:24 : DEBUG -> Type : Panel
2014-09-01 16:11:24 : DEBUG -> Menu : Extension-Name
2014-09-01 16:11:24 : DEBUG -> MenuPlacement : (null)
2014-09-01 16:11:24 : DEBUG -> Size
2014-09-01 16:11:24 : DEBUG -> Height : 300
2014-09-01 16:11:24 : DEBUG -> Width : 300
2014-09-01 16:11:24 : DEBUG -> MaxSize
2014-09-01 16:11:24 : DEBUG -> MinSize
2014-09-01 16:11:24 : DEBUG -> IconPath
2014-09-01 16:11:24 : DEBUG -> IconPath -> Normal : C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions\com.example.ext\icons\iconNormal.png
2014-09-01 16:11:24 : DEBUG -> IconPath -> Disbaled : C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions\com.example.ext\icons\iconDisabled.png
2014-09-01 16:11:24 : DEBUG -> IconPath -> RollOver : C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions\com.example.ext\icons\iconRollover.png
2014-09-01 16:11:24 : DEBUG -> IconPath -> DarkNormal : C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions\com.example.ext\icons\iconDarkNormal.png
2014-09-01 16:11:24 : DEBUG -> IconPath -> DarkRollOver : C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions\com.example.ext\icons\iconDarkRollover.png
2014-09-01 16:11:24 : DEBUG -> DefaultExtensionData : (null)
2014-09-01 16:11:24 : DEBUG -> SpecialExtensionData : (null)
2014-09-01 16:11:24 : DEBUG -> RequiredRuntimeList : 1
2014-09-01 16:11:24 : DEBUG -> RequiredRuntime -> Name : CSXS
2014-09-01 16:11:24 : DEBUG -> RequiredRuntime -> Version : 5.0.0
2014-09-01 16:11:24 : INFO ExtensionManifest 'C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions\com.OLO.Nemo\csxs\manifest.xml' contains '1' valid extensions for this host
2014-09-01 16:11:24 : INFO Found extension with id 'com.OLO.Nemo.extension'
2014-09-01 16:11:24 : DEBUG -> BasePath : C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions\com.OLO.Nemo
2014-09-01 16:11:24 : DEBUG -> ExtensionBundleId : com.OLO.Nemo
2014-09-01 16:11:24 : DEBUG -> ExtensionBundleVersion : 0.5.0
2014-09-01 16:11:24 : DEBUG -> ID : com.OLO.Nemo.extension
2014-09-01 16:11:24 : DEBUG -> Version : 0.5.0
2014-09-01 16:11:24 : DEBUG -> MainPath : C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions\com.OLO.Nemo\Nemo.swf
2014-09-01 16:11:24 : DEBUG -> ScriptPath : C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions\com.OLO.Nemo\Nemo.jsx
2014-09-01 16:11:24 : DEBUG -> ScriptEngineId : com.OLO.Nemo.extension_Engine_Id
2014-09-01 16:11:24 : DEBUG -> AutoVisible : true
2014-09-01 16:11:24 : DEBUG -> StartOn -> Event : 0
2014-09-01 16:11:24 : DEBUG -> Type : Panel
2014-09-01 16:11:24 : DEBUG -> Menu : Nemo
2014-09-01 16:11:24 : DEBUG -> MenuPlacement : (null)
2014-09-01 16:11:24 : DEBUG -> Size
2014-09-01 16:11:24 : DEBUG -> Height : 400
2014-09-01 16:11:24 : DEBUG -> Width : 232
2014-09-01 16:11:24 : DEBUG -> MaxSize
2014-09-01 16:11:24 : DEBUG -> MinSize
2014-09-01 16:11:24 : DEBUG -> IconPath
2014-09-01 16:11:24 : DEBUG -> IconPath -> Normal : (null)
2014-09-01 16:11:24 : DEBUG -> IconPath -> Disbaled : (null)
2014-09-01 16:11:24 : DEBUG -> IconPath -> RollOver : (null)
2014-09-01 16:11:24 : DEBUG -> IconPath -> DarkNormal : (null)
2014-09-01 16:11:24 : DEBUG -> IconPath -> DarkRollOver : (null)
2014-09-01 16:11:24 : DEBUG -> DefaultExtensionData : (null)
2014-09-01 16:11:24 : DEBUG -> SpecialExtensionData : (null)
2014-09-01 16:11:24 : DEBUG -> RequiredRuntimeList : 1
2014-09-01 16:11:24 : DEBUG -> RequiredRuntime -> Name : CSXS
2014-09-01 16:11:24 : DEBUG -> RequiredRuntime -> Version : 5.0.0
2014-09-01 16:11:24 : INFO
********** Number of extensions found : 2 **********
2014-09-01 16:11:24 : INFO Register Extension called for Extension : com.OLO.Nemo.extension, ExtensionType : Trusted
2014-09-01 16:11:24 : INFO ----------------------------------------------------------------
2014-09-01 16:11:24 : DEBUG Extension inPlayerType : 1
2014-09-01 16:11:24 : DEBUG Extension mainUTF8Path : C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions\com.OLO.Nemo\Nemo.swf
2014-09-01 16:11:24 : DEBUG Extension iconPathNormal :
2014-09-01 16:11:24 : DEBUG Extension iconPathRollOver:
2014-09-01 16:11:24 : DEBUG Extension iconPathDisable:
2014-09-01 16:11:24 : DEBUG Extension windowType: Panel
2014-09-01 16:11:24 : DEBUG Extension showWindowOnCreate: true
2014-09-01 16:11:24 : DEBUG Extension defaultGeometry topleftx: 0
2014-09-01 16:11:24 : DEBUG Extension defaultGeometry toplefty: 0
2014-09-01 16:11:24 : DEBUG Extension defaultGeometry width: 232
2014-09-01 16:11:24 : DEBUG Extension defaultGeometry height: 400
2014-09-01 16:11:24 : INFO PlugPlugRegisterExtension() callback returned: PlugPlugErrorCode_success //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< FLASH BASED plugin
2014-09-01 16:11:24 : INFO Register Extension called for Extension : com.example.ext, ExtensionType : Trusted
2014-09-01 16:11:24 : INFO ----------------------------------------------------------------
2014-09-01 16:11:24 : DEBUG Extension inPlayerType : 2
2014-09-01 16:11:24 : DEBUG Extension mainUTF8Path : C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions\com.example.ext\index.html
2014-09-01 16:11:24 : DEBUG Extension iconPathNormal : C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions\com.example.ext\icons\iconNormal.png
2014-09-01 16:11:24 : DEBUG Extension iconPathRollOver: C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions\com.example.ext\icons\iconRollover.png
2014-09-01 16:11:24 : DEBUG Extension iconPathDisable: C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\extensions\com.example.ext\icons\iconDisabled.png
2014-09-01 16:11:24 : DEBUG Extension windowType: Panel
2014-09-01 16:11:24 : DEBUG Extension showWindowOnCreate: true
2014-09-01 16:11:24 : DEBUG Extension defaultGeometry topleftx: 0
2014-09-01 16:11:24 : DEBUG Extension defaultGeometry toplefty: 0
2014-09-01 16:11:24 : DEBUG Extension defaultGeometry width: 300
2014-09-01 16:11:24 : DEBUG Extension defaultGeometry height: 300
2014-09-01 16:11:24 : INFO PlugPlugRegisterExtension() callback returned: PlugPlugErrorCode_registerExtCallbackNotFound
2014-09-01 16:11:24 : WARN Service: com.example.ext not registered properly. //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< HTML5 BASED plugin
2014-09-01 16:11:24 : INFO PlugPlugSetMenu() callback called for main menu. Extension : , inMenuPosition:
(null), Menu: [{menuId: '1',nameUtf8: 'Nemo',extensionId: 'com.OLO.Nemo.extension'}]
2014-09-01 16:11:24 : INFO PlugPlugSetMenu() callback returned: PlugPlugErrorCode_success
2014-09-01 16:11:24 : INFO ExtensionLoadService activated
2014-09-01 16:11:24 : DEBUG PlugPlugAMTRequest() callback called. Request: <?xml version="1.0" encoding="UTF-8"?><PlugPlugEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="./AmtlibPlugPlug.xsd"><request id="1" functionName="getProductLicenseInfo"><arguments/></request></PlugPlugEnvelope>
2014-09-01 16:11:24 : DEBUG PlugPlugAMTRequest() return value: PlugPlugErrorCode_success
2014-09-01 16:11:24 : DEBUG PlugPlugAMTRequest() XML returned chunk: <?xml version="1.0" encoding="utf-8" ?>
<PlugPlugEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="./AmtlibPlugPlug.xsd">
<response id="1" functionName="getProductLicenseInfo">
<AdobeIDCreated>1</AdobeIDCreated>
<LicenseType>Retail</LicenseType>
<LicenseExpires>0</LicenseExpires>
<LicenseRefreshes>0</LicenseRefreshes>
<LicenseEncryptedSerial>909709176804077038364305</LicenseEncryptedSerial>
<LicensedProductName>EPIC_APP_598</LicensedProductName>
<SecondsSinceActivation>0</SecondsSinceActivation>
<SecondsSinceSerialization>8147122</SecondsSinceSerialization>
<SecondsBeforeExpiration>0</SecondsBeforeExpiration>
<SecondsBeforeRefresh>0</SecondsBeforeRefresh>
<AMTLibResponse>6</AMTLibResponse>
<LicenseStatus>3</LicenseStatus>
<SerializationGraceInseconds>3888000</SerializationGraceInseconds>
<ProductCycle>8</ProductCycle>
<PendingClaims>
<PendingClaim>
<AdobeID>87ADE9246F6370DB6008205B2EAE5B95</AdobeID>
<TimeStamp>1401433567</TimeStamp>
</PendingClaim>
</PendingClaims>
<IsSuite>SUITE</IsSuite>
<APIVersion>2.0</APIVersion>
<PersonGUIDWithAuthSource>10B3010147A877E8992015B9@AdobeID</PersonGUIDWithAuthSource>
</response>
</PlugPlugEnvelope>
2014-09-01 16:11:31 : INFO PlugPlugUnloadExtension called for extension : com.OLO.Nemo.extension
2014-09-01 16:11:31 : DEBUG AllocatePlayer() callback called. playerOptions: 0B4CFB01
2014-09-01 16:11:31 : DEBUG AllocatePlayer() callback returned: PlugPlugErrorCode_success
2014-09-01 16:11:31 : DEBUG Connected PlugPlug DOM to APE player
2014-09-01 16:11:31 : DEBUG Looking for available StageManagers
2014-09-01 16:11:31 : DEBUG Looking for available StageManagerBundles in StageManagerManifest at C:\Program Files (x86)\Common Files\Adobe\CEP\StageManager\StageManagerManifest.xml
2014-09-01 16:11:31 : DEBUG No StageManagerManifest found at C:\Program Files (x86)\Common Files\Adobe\CEP\StageManager\StageManagerManifest.xml
2014-09-01 16:11:31 : DEBUG Looking for available StageManagerBundles in StageManagerManifest at C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\StageManager\StageManagerManifest.xml
2014-09-01 16:11:31 : DEBUG No StageManagerManifest found at C:\Users\BC-OLO\AppData\Roaming\Adobe\CEP\StageManager\StageManagerManifest.xml
2014-09-01 16:11:31 : DEBUG Looking for available StageManagerBundles in StageManagerManifest at C:\Program Files (x86)\Adobe\Adobe Dreamweaver CC 2014\Configuration\CEP\StageManager\StageManagerManifest.xml
2014-09-01 16:11:31 : DEBUG Found 1 possible StageManagers in StageManagerManifest
2014-09-01 16:11:31 : DEBUG Added StageManagerBundle StageManagerBundle with Version (5.0.0.20140224_v5_0_0_62), ReleasePath (C:\Program Files (x86)\Adobe\Adobe Dreamweaver CC 2014\Configuration\CEP\StageManager\Release\StageManager-5.0.swf), DebugPath (C:\Program Files (x86)\Adobe\Adobe Dreamweaver CC 2014\Configuration\CEP\StageManager\Debug\StageManager-5.0.swf)
2014-09-01 16:11:31 : DEBUG Determining the most recent StageManagerBundle
2014-09-01 16:11:31 : DEBUG Now checking StageManagerBundle with Version (5.0.0.20140224_v5_0_0_62), ReleasePath (C:\Program Files (x86)\Adobe\Adobe Dreamweaver CC 2014\Configuration\CEP\StageManager\Release\StageManager-5.0.swf), DebugPath (C:\Program Files (x86)\Adobe\Adobe Dreamweaver CC 2014\Configuration\CEP\StageManager\Debug\StageManager-5.0.swf) against (null)
2014-09-01 16:11:31 : DEBUG Will use StageManagerBundle with Version (5.0.0.20140224_v5_0_0_62), ReleasePath (C:\Program Files (x86)\Adobe\Adobe Dreamweaver CC 2014\Configuration\CEP\StageManager\Release\StageManager-5.0.swf), DebugPath (C:\Program Files (x86)\Adobe\Adobe Dreamweaver CC 2014\Configuration\CEP\StageManager\Debug\StageManager-5.0.swf) as the most current StageManagerBundle
2014-09-01 16:11:31 : DEBUG StageManager SWF will be loaded from 'C:\Program Files (x86)\Adobe\Adobe Dreamweaver CC 2014\Configuration\CEP\StageManager\Debug'
2014-09-01 16:11:32 : DEBUG Add StageManager event listener
2014-09-01 16:11:32 : INFO StageManagerController: Created StageManager <STAGE_MANAGER_0> for Extension <com.OLO.Nemo.extension>
2014-09-01 16:11:32 : INFO Return value of PlugPlugUnloadExtension call : PlugPlugErrorCode_unknown
2014-09-01 16:11:32 : INFO PlugPlugTerminate called
2014-09-01 16:11:32 : INFO StageManager: Disposing StageManager <STAGE_MANAGER_0>
2014-09-01 16:11:32 : DEBUG Remove StageManager event listener
2014-09-01 16:11:32 : DEBUG Disconnected PlugPlug DOM from APE player
2014-09-01 16:11:32 : DEBUG DisposePlayer() callback called. apePlayerRef: 06C4CE78
2014-09-01 16:11:32 : DEBUG DisposePlayer() callback returned: PlugPlugErrorCode_success
2014-09-01 16:11:32 : INFO Return value for PlugPlugTerminate: PlugPlugErrorCode_successAssuming we have a CSXS Flash based extension which works with DW CC 2014, steps to be followed for the extension to show up in DW CC 2014:
1. The extension should be placed at /Users/labuser/Library/Application Support/Adobe/Dreamweaver CC 2014/en_US/Configuration/CEP/Extensions . [WIN: C:\Users\labuser\AppData\Roaming\Adobe\Dreamweaver CC 2014.1\en_US\Configuration\CEP\Extensions] . The installation of the zxp should have placed the extension in the above path.
2. Add a custom menu item like <menuitem mmstring:name="menus/DWMenu_Window_BusinessCatalyst" key="Cmd+Shift+B" enabled="true" command="dw.toggleCSXSExtension("com.adobe.bccsdialog");" checked="dw.getFloaterVisibility('BCModulePanel');" id="DWMenu_Window_BC_Modules" /> where the argument in the call dw.toggleCSXSExtension is the Extension Id as seen in the manifest.xml at the line <Extension Id="com.adobe.bccsdialog">.
Note: All these will work provided the extension is successfully registered with DW.
To know if an extension is registered with DW, do the following:
1. On MAC, there is a CSXS preference plist file Users/labuser/Library/Preferences/com.adobe.CSXS.5.plist which has an entry named LogLevel. Set the value to 5 for detailed log. [On windows –Registry - Computer\HKEY_CURRENT_USER\Software\Adobe\CSXS.5]
2. Quit and Launch DW
3. Open Console application and under ~/Library/Logs/CSXS/, there will be a log file created with name csxs5-DRWV.log [WIN: log file is in C:\Users\labuser\AppData\Local\Temp]
4. In the log, search for "Register Extension called for Extension : com.adobe.bccsdialog, ExtensionType : Trusted" and under that, you should see "PlugPlugRegisterExtension() callback returned: PlugPlugErrorCode_success" which mean this extension is successfully registered with DW.
5. When you try loading the extension from the menu you have added, you should see an entry like "INFO PlugPlugLoadExtension called for extension : com.adobe.bccsdialog" followed in the next few lines by " INFO Return value of PlugPlugLoadExtension call : PlugPlugErrorCode_success" and you should see the extension loaded in DW.
If any of these steps fail with any value other than "PlugPlugErrorCode_success", the extension will not load in DW.
The solution provided here is a temporary one and we are bringing back the functionality we have removed in DW CC 2014 in the next release. -
How can I control the size of a cell in the GridBagLayout?
Hi,Swing Gurus
I am developing a swing-based program using JBulider5 enterprise.
It seems to me that the GridBagLayout is really a hard nut!
How can I control the size of a cell in the GridBagLayout?
It seems that I cann't control the size of a cell directly.
But how the size of a particular cell is determined when I switch the layout manager from XYLayout to GridBagLayout?
Thx in advance!
Regards,
Justinehi,i have not done what you are asking but there are fields like
COLUMNWIDTH, MINSIZE, MAXGRIDSIZE, PREFEREDSIZE to which you can set the appropriate values and test for your need.hope this helped.bye martian. -
Example working Flex AIR app for Android?
I'm having trouble getting even the most basic AIR app working on Android. Here is the code:
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:local="*"
width="600" height="600">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<mx:Label text="Hello World"/>
</s:WindowedApplication>
It works fine running on Windows in Flash Builder, obviously it's pretty simple. Here are the commands I use to put it on a Samsung Galaxy Tab with Android 2.2.
C:\Users\Ryan\Adobe Flash Builder 4\Test2\bin-release>adt -package -storetype pkcs12 -keystore C:\Users\Ryan\STG-Android.pfx Test2.air Test2-app.xml Test2.swf
password:
C:\Users\Ryan\Adobe Flash Builder 4\Test2\bin-release>adt -package -target apk -storetype pkcs12 -keystore C:\Users\Ryan\STG-Android.pfx Test2.apk Test2-app.xml Test2.swf
password:
test
C:\Users\Ryan\Adobe Flash Builder 4\Test2\bin-release>adb install -r Test2.apk
2286 KB/s (419172 bytes in 0.179s)
pkg: /data/local/tmp/Test2.apk
Success
A Test2 app icon shows up on my Galaxy Tab under Applications but when I run the app I just see a plain white screen, I don't see the words "Hello World". Any ideas? Does anyone have an example Flex AIR app that works on Android and can post the code so I can try it on my Galaxy Tab? I know AIR is installed correctly on my Galaxy because I installed an AIR app called South Park Avatar Creator that I got from the market and it works fine.
Thanks,
Ryan
P.S. Here is the Test2-app.xml from my non-working project above in case it helps. This is the default generated with a new Flex app in Flash Builder 4 using the Flex 4.1.0 AIR 2.5 SDK but I uncommented the andoid tags and set the visible tag to true.
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/2.5">
<!-- Adobe AIR Application Descriptor File Template.
Specifies parameters for identifying, installing, and launching AIR applications.
xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/2.5
The last segment of the namespace specifies the version
of the AIR runtime required for this application to run.
minimumPatchLevel - The minimum patch level of the AIR runtime required to run
the application. Optional.
-->
<!-- A universally unique application identifier. Must be unique across all AIR applications.
Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
<id>Test2</id>
<!-- Used as the filename for the application. Required. -->
<filename>Test2</filename>
<!-- The name that is displayed in the AIR application installer.
May have multiple values for each language. See samples or xsd schema file. Optional. -->
<name>Test2</name>
<!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade.
Values can also be 1-part or 2-part. It is not necessary to have a 3-part value.
An updated version of application must have a versionNumber value higher than the previous version. Required for namespace >= 2.5 . -->
<versionNumber>1.0.0</versionNumber>
<!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. -->
<!-- <versionLabel></versionLabel> -->
<!-- Description, displayed in the AIR application installer.
May have multiple values for each language. See samples or xsd schema file. Optional. -->
<!-- <description></description> -->
<!-- Copyright information. Optional -->
<!-- <copyright></copyright> -->
<!-- Publisher ID. Used if you're updating an application created prior to 1.5.3 -->
<!-- <publisherID></publisherID> -->
<!-- Settings for the application's initial window. Required. -->
<initialWindow>
<!-- The main SWF or HTML file of the application. Required. -->
<!-- Note: In Flash Builder, the SWF reference is set automatically. -->
<content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
<!-- The title of the main window. Optional. -->
<!-- <title></title> -->
<!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
<!-- <systemChrome></systemChrome> -->
<!-- Whether the window is transparent. Only applicable when systemChrome is none. Optional. Default false. -->
<!-- <transparent></transparent> -->
<!-- Whether the window is initially visible. Optional. Default false. -->
<visible>true</visible>
<!-- Whether the user can minimize the window. Optional. Default true. -->
<!-- <minimizable></minimizable> -->
<!-- Whether the user can maximize the window. Optional. Default true. -->
<!-- <maximizable></maximizable> -->
<!-- Whether the user can resize the window. Optional. Default true. -->
<!-- <resizable></resizable> -->
<!-- The window's initial width in pixels. Optional. -->
<!-- <width></width> -->
<!-- The window's initial height in pixels. Optional. -->
<!-- <height></height> -->
<!-- The window's initial x position. Optional. -->
<!-- <x></x> -->
<!-- The window's initial y position. Optional. -->
<!-- <y></y> -->
<!-- The window's minimum size, specified as a width/height pair in pixels, such as "400 200". Optional. -->
<!-- <minSize></minSize> -->
<!-- The window's initial maximum size, specified as a width/height pair in pixels, such as "1600 1200". Optional. -->
<!-- <maxSize></maxSize> -->
</initialWindow>
<!-- We recommend omitting the supportedProfiles element, -->
<!-- which in turn permits your application to be deployed to all -->
<!-- devices supported by AIR. If you wish to restrict deployment -->
<!-- (i.e., to only mobile devices) then add this element and list -->
<!-- only the profiles which your application does support. -->
<!-- <supportedProfiles>desktop extendedDesktop mobileDevice extendedMobileDevice</supportedProfiles> -->
<!-- The subpath of the standard default installation location to use. Optional. -->
<!-- <installFolder></installFolder> -->
<!-- The subpath of the Programs menu to use. (Ignored on operating systems without a Programs menu.) Optional. -->
<!-- <programMenuFolder></programMenuFolder> -->
<!-- The icon the system uses for the application. For at least one resolution,
specify the path to a PNG file included in the AIR package. Optional. -->
<!-- <icon>
<image16x16></image16x16>
<image32x32></image32x32>
<image36x36></image36x36>
<image48x48></image48x48>
<image72x72></image72x72>
<image128x128></image128x128>
</icon> -->
<!-- Whether the application handles the update when a user double-clicks an update version
of the AIR file (true), or the default AIR application installer handles the update (false).
Optional. Default false. -->
<!-- <customUpdateUI></customUpdateUI> -->
<!-- Whether the application can be launched when the user clicks a link in a web browser.
Optional. Default false. -->
<!-- <allowBrowserInvocation></allowBrowserInvocation> -->
<!-- Listing of file types for which the application can register. Optional. -->
<!-- <fileTypes> -->
<!-- Defines one file type. Optional. -->
<!-- <fileType> -->
<!-- The name that the system displays for the registered file type. Required. -->
<!-- <name></name> -->
<!-- The extension to register. Required. -->
<!-- <extension></extension> -->
<!-- The description of the file type. Optional. -->
<!-- <description></description> -->
<!-- The MIME content type. -->
<!-- <contentType></contentType> -->
<!-- The icon to display for the file type. Optional. -->
<!-- <icon>
<image16x16></image16x16>
<image32x32></image32x32>
<image48x48></image48x48>
<image128x128></image128x128>
</icon> -->
<!-- </fileType> -->
<!-- </fileTypes> -->
<!-- Specify Android specific tags that get passed to AndroidManifest.xml file. -->
<android>
<manifestAdditions>
<![CDATA[
<manifest android:installLocation="auto">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-configuration android:reqFiveWayNav="true"/>
<supports-screens android:normalScreens="true"/>
<uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch"/>
<application android:enabled="true">
<activity android:excludeFromRecents="false">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
]]>
</manifestAdditions>
</android>
<!-- End of the schema for adding the android specific tags in AndroidManifest.xml file -->
</application><?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:local="*"
width="600" height="600">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<mx:Label text="Hello World"/>
</s:Application> -
Coldfusion 11 error with cflayout
0 down vote favorite
I have some applications developed on older CF versions (9&10) and in anticipation of a hosting system migrating to CF11 and started doing some
testing with a CF development platform on Windows 8 with Apache 2.4. I have found that in CF11 pages using cflayout and cflayoutarea does not work
correctly when collapsed with javascript:ColdFusion.Layout.collapseArea. Firebug does flag an error in the CF javascript. Wondering if anyone else
has seen a problem like this and if there is a circumvention I could use to get this working.
A very simple example (complements of the Chapter 2 cflayout example demonstrated in Dan Short's video on Ajax & Coldfusion) fails as well on
CF11 but works in CF9 & CF10.
main.cfm
<!doctype html> <html> <head> <meta charset="utf-8"> </head> <body> <cflayout name="borderLayout" type="border" fittowindow="true"> <cflayoutarea name="header" position="top" size="75">This is the header<br /> <a href="javascript:ColdFusion.Layout.collapseArea('borderLayout', 'left');">Collapse Left Column</a><br> </cflayoutarea> <cflayoutarea name="centerColumn" position="center" source="content.cfm?pageName=Header 1" /> <cflayoutarea name="rightColumn" position="right" style="width: 100px;">This is the right column</cflayoutarea> <cflayoutarea name="leftColumn" position="left" title="Left Column" style="width: 250px;" collapsible="true" splitter="true" minsize="200"> This is the left column<br /> <a href="javascript:ColdFusion.navigate('content.cfm?pagename=Header 2', 'centerColumn');">Load Header 2</a> </cflayoutarea> <cflayoutarea name="footer" position="bottom">This is a footer © 2010</cflayoutarea> </cflayout> </body> </html>
content.cfm
<cfsilent> <cfparam name="URL.pageName" default="Default header" /> </cfsilent> <!doctype html> <html> <head> <meta charset="utf-8"> </head> <body> <cfoutput><h2>#URL.pageName#</h2></cfoutput> <p>This is the text content from content.cfm</p> </body> </html>use <CFAJAXIMPORT tag and make sure you have the CFIDE folder as a virtual directory in your IIS local or server machine. if the "cfajaximport" tag alone didn't work, try using it in little more details to the path of CFIDE folder and specify cflayout within the cfajaximport tag as follows:
<CFAJAXIMPORT
CSSSRC = "CFIDE/scripts/ajax/"
SCRIPTSRC = "/CFIDE/scripts"
TAGS = "cfdiv,cfform,cfgrid,cfinput-autosuggest,cfinput-datefield,cflayout-border,cflayout-tab,cfmenu,cftextarea,cftooltip,cftree,cfwindow">
Normally, you shouldn't need all these specifications in the cfajaximport but in case you may try it in more detail as shown above. -
SAP R/3 Connection in WEB AS 6.40
Hello,
I am currently in the process of <i>migrating our enterprise application from Jboss to SAPWAS 6.40</i>. One of the tasks is to get the SAP R/3 connectivity happening in SAP WAS server. We connect to the SAP R/3 system from our java classes and realise we have to use JCO to do this.
is there a set of steps outlined anywhere which might tell me what is required to achieve the above? As in how do i go about setting the Connector Factory, getting hold of the relevant jars and dlls (if rquired)
Any help is much appreciated and <b>promise to reward the person with any useful information</b>.
Thanks
DushyHi Bhavik, Much appreciate your response. At this stage I am not too concerned about how to call the RFC from our Java classes as we already had that in Place in Jboss. I am more concerned about how to go about declaring the JCO adapter. Here is an example from a *-ds.xml file in Jboss that we used to basically deploy our adapter into Jboss. Do we need a similar thing in Netweaver??
<?xml version="1.0" encoding="UTF-8"?>
<!-- ==================================================================== -->
<!-- New ConnectionManager setup for firebird dbs using jca-jdbc xa driver-->
<!-- Build jmx-api (build/build.sh all) and view for config documentation -->
<!-- ==================================================================== -->
<service>
<mbean code="org.jboss.resource.connectionmanager.XATxConnectionManager" name="jboss.jca:service=XaTxCM,name=SAPConnectorFactory">
<!make the rar deploy - A BIG HACK till xslt based deployment is written>
<depends>jboss.jca:service=RARDeployer</depends>
<depends optional-attribute-name="ManagedConnectionFactoryName">
<mbean code="org.jboss.resource.connectionmanager.RARDeployment" name="jboss.jca:service=XaTxDS,name=SAPConnectorFactory">
<!more hack>
<depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=SAPConnectorFactory</depends>
<attribute name="ManagedConnectionFactoryProperties">
<properties>
<config-property>
<description>The client-number of the R/3 system</description>
<config-property-name>ClientNumber</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>100</config-property-value>
</config-property>
<config-property>
<description>The name of the user, with which to logon to the system</description>
<config-property-name>UserName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value>MDROVER</config-property-value>
</config-property>
</config-property>
<config-property>
<description>The name of the message-server (hostname or ip-address) for the R/3 system</description>
<config-property-name>MessageServerName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>The system-name of the R/3 system</description>
<config-property-name>SystemName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value></config-property-value>
</config-property>
<config-property>
<description>The name of the group of application servers</description>
<config-property-name>GroupName</config-property-name>
<config-property-type>java.lang.String</config-property-type>
<config-property-value></config-property-value>
</config-property>
</properties>
</attribute>
<attribute name="JndiName">R3ConnectionFactory</attribute>
</mbean>
</depends>
<depends optional-attribute-name="ManagedConnectionPool">
<mbean code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" name="jboss.jca:service=XaTxPool,name=SAPConnectorFactory">
<attribute name="MinSize">0</attribute>
<attribute name="MaxSize">50</attribute>
<attribute name="BlockingTimeoutMillis">5000</attribute>
<attribute name="IdleTimeoutMinutes">15</attribute>
<!--criteria indicates if Subject (from security domain) or app supplied
parameters (such as from getConnection(user, pw)) are used to distinguish
connections in the pool. Choices are
ByContainerAndApplication (use both),
ByContainer (use Subject),
ByApplication (use app supplied params only),
ByNothing (all connections are equivalent, usually if adapter supports
reauthentication)-->
<attribute name="Criteria">ByContainer</attribute>
</mbean>
</depends>
<depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
<!-- Include a login module configuration named SAPR3Realm.
Update your login-conf.xml, here is an example for a
ConfiguredIdentityLoginModule:
<application-policy name = "SAPR3Realm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
<module-option name = "principal">MDROVER</module-option>
<module-option name = "userName">MDROVER</module-option>
<module-option name = "password">BAPIRFC1</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=XaTxCM,name=SAPConnectorFactory</module-option>
</login-module>
</authentication>
</application-policy>
NOTE: the application-policy name attribute must match SecurityDomainJndiName, and the
module-option name = "managedConnectionFactoryName"
must match the object name of the ConnectionManager you are configuring here.
-->
<!--comment out this line if you want component managed security or want
to use the default values in the ManagedConnectionFactoryProperties -->
<attribute name="SecurityDomainJndiName">SAPR3Realm</attribute>
<depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
<attribute name="TransactionManager">java:/TransactionManager</attribute>
</mbean>
</service> -
JCombobox with JMenuBar (as drop down menu)
Hello, i'm trying to make a new component (as generic as possible) to display a tree structure in a combo-like style.
So i finally choose a JTextfield to display the current item + a JMenuBar with Menu and MenuItem generated from a TreeModel (i'm not sure this is the better choice to make, but tha's not my present problem).
2 questions :
1) am I reinventing the wheel ???
2) i've got a problem of pack when displaying the compent and i don't find where.
Thanks. Cyril.
So, the code... two main classes : TreeComboBox + ArrowMenu
the TreeComboBox :
package fr.emanation.util.gui.treeComboBox;
import javax.swing.*;
import javax.swing.tree.TreeModel;
import java.awt.*;
import java.awt.event.FocusListener;
public class TreeComboBox<TNode> extends JPanel
private TNode theSelectedNode;
private ArrowMenuBar theMenuBar;
private JTextField theTextField;
private int theCompactWidth;
public TreeComboBox(TreeModel aTreeModel)
new BorderLayout(0, 0);
theTextField = new JTextField();
theTextField.setEditable(true);
theTextField.setBackground(Color.white);
setFocusable(false);
add(theTextField, BorderLayout.CENTER);
MyArrowMenuInvoker anInvoker = new MyArrowMenuInvoker();
theMenuBar = new ArrowMenuBar<TNode>(anInvoker, aTreeModel);
JPanel menuBarPanel = new JPanel(new BorderLayout(0, 0));
menuBarPanel.add(theMenuBar, BorderLayout.CENTER);
add(menuBarPanel, BorderLayout.EAST);
public TNode getNode()
return (TNode) theSelectedNode;
public void setSelectedNode(TNode aNode)
theSelectedNode = aNode;
theTextField.setText(aNode.toString());
public TreeModel getModel()
return theMenuBar.getModel();
public JComponent[] getFocusableComponents()
return new JComponent[]{theTextField, theMenuBar};
//-- JComponent overriden methods
public Dimension getMinimumSize()
final Dimension minSize = super.getMinimumSize();
minSize.width = theCompactWidth;
return minSize;
public void setCompactWidth(final int aCompactWidth)
theCompactWidth = aCompactWidth;
public void setPreferredSize(Dimension aSize)
super.setPreferredSize(aSize);
if (theTextField != null)
theTextField.setPreferredSize(aSize);
public void setForeground(Color fg)
super.setForeground(fg);
if (theMenuBar != null)
for (int index = 0; index < theMenuBar.getComponentCount(); index++)
theMenuBar.getComponents()[index].setForeground(fg);
if (theTextField != null)
theTextField.setForeground(fg);
public void setBackground(Color bg)
super.setBackground(bg);
if (theMenuBar != null)
for (int index = 0; index < theMenuBar.getComponentCount(); index++)
theMenuBar.getComponents()[index].setBackground(bg);
if (theTextField != null)
theTextField.setBackground(bg);
public void setFont(Font aFont)
super.setFont(aFont);
if (theMenuBar != null)
theMenuBar.setFont(aFont);
if (theTextField != null)
theTextField.setFont(aFont);
public void setToolTipText(String aToolTip)
super.setToolTipText(aToolTip);
if (theTextField != null)
theTextField.setToolTipText(aToolTip);
public void setEnabled(final boolean bEnabled)
super.setEnabled(bEnabled);
if (theTextField != null) return;
theTextField.setEnabled(bEnabled);
if (bEnabled)
theTextField.setBackground(Color.WHITE);
else
JLabel tmpLabel = new JLabel();
tmpLabel.setEnabled(false);
theTextField.setBackground(tmpLabel.getBackground());
if (theMenuBar != null)
theMenuBar.setEnabled(bEnabled);
public synchronized void addFocusListener(FocusListener l)
super.addFocusListener(l);
if (theMenuBar != null)
theMenuBar.addFocusListener(l);
if (theTextField != null)
theTextField.addFocusListener(l);
public synchronized void removeFocusListener(FocusListener l)
super.removeFocusListener(l);
if (theMenuBar != null)
theMenuBar.removeFocusListener(l);
if (theTextField != null)
theTextField.removeFocusListener(l);
public boolean isFocusOwner()
if (theMenuBar == null || theTextField == null) return super.isFocusOwner();
boolean bM = (theMenuBar == null) && theMenuBar.isFocusOwner();
boolean bT = (theTextField == null) && theTextField.isFocusOwner();
return (bM || bT);
//-- inner classes
private class MyArrowMenuInvoker implements IArrowMenuInvoker<TNode>
public Component getComponent()
return theTextField;
public void setNode(TNode aNode)
setSelectedNode(aNode);
}the ArrowMenuBar :
package fr.emanation.util.gui.treeComboBox;
import javax.swing.*;
import javax.swing.border.EtchedBorder;
import javax.swing.plaf.UIResource;
import javax.swing.tree.TreeModel;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class ArrowMenuBar<TNode> extends JMenuBar
private NodeMenu theMenu;
private TreeModel theModel;
private IArrowMenuInvoker<TNode> theInvoker;
public ArrowMenuBar(IArrowMenuInvoker<TNode> anInvoker, TreeModel aModel)
super();
theModel = aModel;
theInvoker = anInvoker;
TNode root = (TNode) theModel.getRoot();
if (!theModel.isLeaf(root))
theMenu = new ArrowMenu(root);
theMenu.setBackground(new JPanel().getBackground());
MenuItemListener listener = new MenuItemListener();
setListener(theMenu, listener);
add(theMenu);
private void setListener(JMenuItem anItem, ActionListener aListener)
if (anItem instanceof JMenu)
JMenu menu = (JMenu) anItem;
int n = menu.getItemCount();
for (int index = 0; index < n; index++)
setListener(menu.getItem(index), aListener);
else if (anItem != null)
// null means separator
anItem.addActionListener(aListener);
public TreeModel getModel()
return theModel;
public Action getLaunchArrowMenuBarAction()
return new LaunchArrowMenuBarAction();
//-- overrides JComponent
public Dimension getPreferredSize()
return theMenu.getPreferredSize();
private Dimension getItemSize(JMenu aMenu)
Dimension dimension = new Dimension(0, 0);
int n = aMenu.getItemCount();
for (int index = 0; index < n; index++)
Dimension itemD;
JMenuItem item = aMenu.getItem(index);
if (item instanceof JMenu)
itemD = getItemSize((JMenu) item);
else if (item != null)
itemD = item.getPreferredSize();
else
itemD = new Dimension(0, 0); // separator
dimension.width = Math.max(dimension.width, itemD.width);
dimension.height = Math.max(dimension.height, itemD.height);
return dimension;
//--- inner classes
private class LaunchArrowMenuBarAction extends AbstractAction
public LaunchArrowMenuBarAction()
super("...");
public void actionPerformed(ActionEvent e)
if (e.getActionCommand() == "Launch")
System.out.println("Launch");
private class MenuItemListener implements ActionListener
public void actionPerformed(ActionEvent anEvent)
NodeMenuItem item = (NodeMenuItem) anEvent.getSource();
theInvoker.setNode(item.getNode());
theMenu.requestFocus();
private class NodeMenu extends JMenu
private TNode theNode;
public NodeMenu(TNode aNode)
this(aNode.toString(), aNode);
public NodeMenu(String theText, TNode aNode)
super(theText);
theNode = aNode;
add(new NodeMenuItem("[.]", aNode));
for (int index = 0; index < theModel.getChildCount(aNode); index++)
TNode childNode = (TNode) theModel.getChild(aNode, index);
if (theModel.isLeaf(childNode))
add(new NodeMenuItem(childNode));
else
add(new NodeMenu(childNode));
public void setNode(TNode aNode)
theNode = aNode;
public TNode getNode()
return theNode;
private class NodeMenuItem extends JMenuItem
private TNode theNode;
public NodeMenuItem(TNode aNode)
super(aNode.toString());
theNode = aNode;
public NodeMenuItem(String aText, TNode aNode)
super(aText);
theNode = aNode;
public TNode getNode()
return theNode;
private class ArrowMenu extends NodeMenu
// private ArrowIcon theIconRenderer;
private Color shadow = UIManager.getColor("controlShadow");
private Color darkShadow = UIManager.getColor("controlDkShadow");
private Color highlight = UIManager.getColor("controlLtHighlight");
public ArrowMenu(TNode aNode)
super("", aNode);
// theIconRenderer = new ArrowIcon(SwingConstants.SOUTH, true);
setBorder(new EtchedBorder());
// setIcon(new BlankIcon(null, 11));
setHorizontalTextPosition(JButton.LEFT);
setFocusPainted(true);
public void paint(Graphics g)
Color origColor;
boolean isEnabled;
int w, h, size;
w = getSize().width;
h = getSize().height;
origColor = g.getColor();
isEnabled = isEnabled();
g.setColor(getBackground());
g.fillRect(1, 1, w - 2, h - 2);
/// Draw the proper Border
if (getBorder() != null && !(getBorder() instanceof UIResource))
paintBorder(g);
else
// Using the background color set above
g.drawLine(0, 0, 0, h - 1);
g.drawLine(1, 0, w - 2, 0);
g.setColor(highlight); // inner 3D border
g.drawLine(1, 1, 1, h - 3);
g.drawLine(2, 1, w - 3, 1);
g.setColor(shadow); // inner 3D border
g.drawLine(1, h - 2, w - 2, h - 2);
g.drawLine(w - 2, 1, w - 2, h - 3);
g.setColor(darkShadow); // black drop shadow __|
g.drawLine(0, h - 1, w - 1, h - 1);
g.drawLine(w - 1, h - 1, w - 1, 0);
// If there's no room to draw arrow, bail
if (h < 5 || w < 5)
g.setColor(origColor);
return;
// Draw the arrow
size = Math.min((h - 4) / 3, (w - 4) / 3);
size = Math.max(size, 2);
paintTriangle(g, (w - size) / 2, (h - size) / 2,
size, SwingConstants.SOUTH, isEnabled);
// Reset the Graphics back to it's original settings
g.setColor(origColor);
public Dimension getPreferredSize()
return new Dimension(16, 16);
public Dimension getMinimumSize()
return new Dimension(5, 5);
public Dimension getMaximumSize()
return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE);
public void paintTriangle(Graphics g, int x, int y, int size,
int direction, boolean isEnabled)
Color oldColor = g.getColor();
int mid, i, j;
j = 0;
size = Math.max(size, 2);
mid = (size / 2) - 1;
g.translate(x, y);
if (isEnabled)
g.setColor(darkShadow);
else
g.setColor(shadow);
switch (direction)
case NORTH:
for (i = 0; i < size; i++)
g.drawLine(mid - i, i, mid + i, i);
if (!isEnabled)
g.setColor(highlight);
g.drawLine(mid - i + 2, i, mid + i, i);
break;
case SOUTH:
if (!isEnabled)
g.translate(1, 1);
g.setColor(highlight);
for (i = size - 1; i >= 0; i--)
g.drawLine(mid - i, j, mid + i, j);
j++;
g.translate(-1, -1);
g.setColor(shadow);
j = 0;
for (i = size - 1; i >= 0; i--)
g.drawLine(mid - i, j, mid + i, j);
j++;
break;
case WEST:
for (i = 0; i < size; i++)
g.drawLine(i, mid - i, i, mid + i);
if (!isEnabled)
g.setColor(highlight);
g.drawLine(i, mid - i + 2, i, mid + i);
break;
case EAST:
if (!isEnabled)
g.translate(1, 1);
g.setColor(highlight);
for (i = size - 1; i >= 0; i--)
g.drawLine(j, mid - i, j, mid + i);
j++;
g.translate(-1, -1);
g.setColor(shadow);
j = 0;
for (i = size - 1; i >= 0; i--)
g.drawLine(j, mid - i, j, mid + i);
j++;
break;
g.translate(-x, -y);
g.setColor(oldColor);
}Darkness and blindness are away !
First line of the constructor :
public TreeComboBox(TreeModel aTreeModel)
new BorderLayout(0, 0);
}I will reborn as a pumpkin ! -
Would someone please help me. I am new to applet development and I get a compile error associated with the event handling in my first ever applet code as follows:
C:\j2sdk1.4.2_01\bin>javac trajectory_j.java
trajectory_j.java:248: illegal start of expression
private class Handler implements ActionListener {
^
trajectory_j.java:248: ';' expected
private class Handler implements ActionListener {
^
2 errors
de.
This is the code:
// trajectory Analysis Program: trajectory_j.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class trajectory_j extends JApplet implements ActionListener {
private JTextArea introductionArea, resultsArea;
private JLabel spanLabel, chordLabel,
thicknessLabel, massLabel, altitudeLabel, velocityLabel,
trajectory_angleLabel, time_incrementLabel, rotation_factorLabel,
calculationLabel, resultsLabel;
private JTextField spanField, chordField, thicknessField,
massField, altitudeField, velocityField, trajectory_angleField,
time_incrementField, rotation_factorField;
private JButton startButton, resetButton, contButton, termButton;
String introduction_string, span_string, chord_string, thickness_string, mass_string,
altitude_string, velocity_string, trajectory_angle_string,
time_increment_string, rotation_factor_string, results_string;
double span, chord, thickness, mass, altitude, velocity, trajectory_angle, time_increment,
rotation_factor, distance, velocity_fps, elapsed_time;
int status_a;
int status_b;
int status_c;
/* deletion of code segment a
span = 0;
chord = 0;
thickness = 0;
mass = 0;
altitude = 0;
velocity = 0;
trajectory_angle = 0;
time_increment = 0;
rotation_factor = 0;
distance = 0;
velocity_fps = 0;
elapsed_time = 0;
velocity_fps = 0;
elapsed_time = 0;
// create objects
public void init()
status_a = 0;
status_b = 0;
status_c = 0;
// create container & panel
Container container = getContentPane();
Panel panel = new Panel( new FlowLayout( FlowLayout.LEFT));
container.add( panel );
// set up vertical boxlayout
Box box = Box.createVerticalBox();
Box inputbox1 = Box.createHorizontalBox();
Box inputbox2 = Box.createHorizontalBox();
Box inputbox3 = Box.createHorizontalBox();
Box buttonbox = Box.createHorizontalBox();
introduction_string = "This is the introduction";
// set up introduction
introductionArea = new JTextArea( introduction_string, 10, 50 );
introductionArea.setEditable( false );
box.add( new JScrollPane( introductionArea ) );
box.add( Box.createVerticalStrut (10) );
box.add( inputbox1);
// set up span
spanLabel = new JLabel( "span (feet)" );
spanField = new JTextField(5 );
inputbox1.add( spanLabel );
inputbox1.add( spanField );
Dimension minSize = new Dimension(5, 15);
Dimension prefSize = new Dimension(5, 15);
Dimension maxSize = new Dimension(Short.MAX_VALUE, 15);
inputbox1.add(new Box.Filler(minSize, prefSize, maxSize));
// set up chord
chordLabel = new JLabel( "chord (feet)" );
chordField = new JTextField(5 );
inputbox1.add( chordLabel );
inputbox1.add( chordField );
inputbox1.add(new Box.Filler(minSize, prefSize, maxSize));
// set up thickness
thicknessLabel = new JLabel( "thickness (feet)" );
thicknessField = new JTextField(5 );
inputbox1.add( thicknessLabel );
inputbox1.add( thicknessField );
inputbox1.add(new Box.Filler(minSize, prefSize, maxSize));
// set up mass
massLabel = new JLabel( "mass (slugs)" );
massField = new JTextField(5);
inputbox1.add( massLabel );
inputbox1.add( massField );
box.add( Box.createVerticalStrut (10) );
box.add( inputbox2);
// set up altitude
altitudeLabel = new JLabel( "altitude (feet)");
altitudeField = new JTextField(5 );
inputbox2.add( altitudeLabel );
inputbox2.add( altitudeField );
inputbox2.add(new Box.Filler(minSize, prefSize, maxSize));
// set up velocity
velocityLabel = new JLabel( "velocity (Mach Number)");
velocityField = new JTextField(5);
inputbox2.add( velocityLabel );
inputbox2.add( velocityField );
inputbox2.add(new Box.Filler(minSize, prefSize, maxSize));
// set up trajectory_angle
trajectory_angleLabel = new JLabel( "trajectory angle ( -90 degrees <= trajectory angle <= 90 degrees )");
trajectory_angleField = new JTextField(5);
inputbox2.add( trajectory_angleLabel );
inputbox2.add( trajectory_angleField );
box.add( Box.createVerticalStrut (10) );
box.add( inputbox3);
Dimension minSizeF = new Dimension(70, 15);
Dimension prefSizeF = new Dimension(70, 15);
Dimension maxSizeF = new Dimension(Short.MAX_VALUE, 15);
inputbox3.add(new Box.Filler(minSizeF, prefSizeF, maxSizeF));
// set up time_increment
time_incrementLabel = new JLabel( "time increment (seconds)" );
time_incrementField = new JTextField(5);
inputbox3.add( time_incrementLabel );
inputbox3.add( time_incrementField );
inputbox3.add(new Box.Filler(minSizeF, prefSizeF, maxSizeF));
// set up rotation_factor
rotation_factorLabel = new JLabel( "rotation factor ( non-negative number)" );
rotation_factorField = new JTextField(5);
inputbox3.add( rotation_factorLabel );
inputbox3.add( rotation_factorField );
inputbox3.add(new Box.Filler(minSizeF, prefSizeF, maxSizeF));
box.add( Box.createVerticalStrut (10) );
box.add( buttonbox);
// set up start
startButton = new JButton( "START" );
buttonbox.add( startButton );
Dimension minSizeB = new Dimension(10, 30);
Dimension prefSizeB = new Dimension(10, 30);
Dimension maxSizeB = new Dimension(Short.MAX_VALUE, 30);
buttonbox.add(new Box.Filler(minSizeB, prefSizeB, maxSizeB));
// set up reset
resetButton = new JButton( "RESET" );
buttonbox.add( resetButton );
buttonbox.add(new Box.Filler(minSizeB, prefSizeB, maxSizeB));
// set up cont
contButton = new JButton( "CONTINUE" );
buttonbox.add( contButton );
buttonbox.add(new Box.Filler(minSizeB, prefSizeB, maxSizeB));
// set up term
termButton = new JButton( "END" );
buttonbox.add( termButton );
box.add( Box.createVerticalStrut (10) );
// set up results
resultsArea = new JTextArea( results_string, 10, 50 );
resultsArea.setEditable( false );
box.add( new JScrollPane( resultsArea ) );
// add box to panel
panel.add( box );
// register event handlers
Handler handler = new Handler();
spanField.addActionListener( handler );
chordField.addActionListener( handler );
thicknessField.addActionListener( handler );
massField.addActionListener( handler );
altitudeField.addActionListener( handler );
velocityField.addActionListener( handler );
trajectory_angleField.addActionListener( handler );
time_incrementField.addActionListener( handler );
rotation_factorField.addActionListener( handler );
startButton.addActionListener( handler );
resetButton.addActionListener( handler );
contButton.addActionListener( handler );
termButton.addActionListener( handler );
// private inner class for event handling
private class Handler implements ActionListener {
// process handler events
public void actionPerformed( ActionEvent event )
// process resetButton event
if ( event.getSource() == resetButton )
reset();
// process contButton event
if ( event.getSource() == contButton )
cont();
// process endButton event
if ( event.getSource() == termButton )
// process span event
if( event.getSource() == spanField ) {
span = Double.parseDouble( event.getActionCommand() );
spanField.setText( span_string );
status_b++;
// process chord event
if( event.getSource() == spanField ) {
span = Double.parseDouble( event.getActionCommand() );
spanField.setText( chord_string );
status_b++;
// process thickness event
if( event.getSource() == thicknessField ) {
thickness = Double.parseDouble( event.getActionCommand() );
spanField.setText( thickness_string );
status_b++;
// process mass event
if( event.getSource() == massField ) {
mass = Double.parseDouble( event.getActionCommand() );
spanField.setText( mass_string );
status_b++;
// process altitude event
if( event.getSource() == altitudeField ) {
altitude = Double.parseDouble( event.getActionCommand() );
spanField.setText( altitude_string );
status_b++;
// process velocity event
if( event.getSource() == velocityField ) {
velocity = Double.parseDouble( event.getActionCommand() );
spanField.setText( velocity_string );
status_b++;
// process trajectory_angle event
if( event.getSource() == trajectory_angleField ) {
trajectory_angle = Double.parseDouble( event.getActionCommand() );
spanField.setText( trajectory_angle_string );
status_b++;
// process time_increment event
if( event.getSource() == time_incrementField ) {
time_increment = Double.parseDouble( event.getActionCommand() );
spanField.setText( time_increment_string );
status_b++;
// process rotation_factor event
if( event.getSource() == rotation_factorField ) {
rotation_factor = Double.parseDouble( event.getActionCommand() );
spanField.setText( rotation_factor_string );
status_b++;
// process startButton event
if ( event.getSource() == startButton && status_b == 9 ) {
status_c = 1;
} // end method event handler
} // end Handler class
} // end method init
public void strtb()
/* deletion of code segment 1
startButton.addActionListener(
new ActionListener() { // anonymous inner class
// set text in resultsArea
public void actionPerformed( ActionEvent event )
if( status_c == 1 ){
calculate();
results();
resultsArea.setText( results() );
/* deletion of code segment 2
}// end method actionPerformed1
} // end anonymous inner class1
); // end call to addActionlistener1
} // end method strtb
public void reset()
/* deletion of code segment 3
resetButton.addActionListener(
new ActionListener() { // anonymous inner class
// set text in resultsArea
public void actionPerformed( ActionEvent event )
span_string = "";
chord_string = "";
thickness_string = "";
mass_string = "";
altitude_string = "";
velocity_string = "";
trajectory_angle_string = "";
time_increment_string = "";
rotation_factor_string = "";
results_string = "";
spanField.setText( span_string );
chordField.setText( chord_string );
thicknessField.setText( thickness_string );
massField.setText( mass_string );
altitudeField.setText( altitude_string );
velocityField.setText( velocity_string );
trajectory_angleField.setText( trajectory_angle_string );
time_incrementField.setText( time_increment_string );
rotation_factorField.setText( rotation_factor_string );
resultsArea.setEditable( true );
resultsArea.setText( results_string );
resultsArea.setEditable( false );
span = 0;
chord = 0;
thickness = 0;
mass = 0;
altitude = 0;
velocity = 0;
trajectory_angle = 0;
time_increment = 0;
rotation_factor = 0;
distance = 0;
velocity_fps = 0;
elapsed_time = 0;
/* deletion of code segment 4
} // end method actionPerformed2
} // end anonymous inner class2
); // end call to addActionlistener2
} // end method reset
public void cont()
//later
public void calculate()
distance = 1;
altitude = 2;
trajectory_angle = 3;
velocity_fps = 4;
elapsed_time = 5;
public String results()
results_string =
"Distance =\t\t" + distance + " miles\n"
+ "Altitude =\t\t" + altitude + " feet\n"
+ "Trajectory Angle =\t" + trajectory_angle + " degrees\n"
+ "Velocity =\t\t" + velocity_fps + " feet per second\n"
+ "Elapsed Time =\t\t" + elapsed_time + " seconds\n"
+ "\nstatus_a = " + status_a + "\nstatus_b = "
+ status_b + "\nstatus_c = " + status_c;
return results_string;
public void start()
if(status_a == 0 )
strtb();
if (status_b == 0)
reset();
}// end method start
} //end class trajectory_aThe following are copies of html and java source code files for a prior runnable version ( trajectory_b ) of this program which can enlighten some functionality intended by the program.
(trajectory_b.html):
<html>
<appletcode = "trajectory_b.class" width = "800" height = "600">
</applet>
</html>
(trajectory_b.java):
// trajectory Analysis Program: trajectory_b.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class trajectory_b extends JApplet implements ActionListener {
private JTextArea introductionArea, resultsArea;
private JLabel spanLabel, chordLabel,
thicknessLabel, massLabel, altitudeLabel, velocityLabel,
trajectory_angleLabel, time_incrementLabel, rotation_factorLabel,
calculationLabel, resultsLabel;
private JTextField spanField, chordField, thicknessField,
massField, altitudeField, velocityField, trajectory_angleField,
time_incrementField, rotation_factorField;
private JButton startButton, resetButton, contButton, termButton;
String introduction_string, span_string, chord_string, thickness_string, mass_string,
altitude_string, velocity_string, trajectory_angle_string,
time_increment_string, rotation_factor_string, results_string;
double span, chord, thickness, mass, altitude, velocity, trajectory_angle, time_increment,
rotation_factor, distance, velocity_fps, elapsed_time;
int status_a;
int status_b;
int status_c;
/* deletion of code segment a
span = 0;
chord = 0;
thickness = 0;
mass = 0;
altitude = 0;
velocity = 0;
trajectory_angle = 0;
time_increment = 0;
rotation_factor = 0;
distance = 0;
velocity_fps = 0;
elapsed_time = 0;
velocity_fps = 0;
elapsed_time = 0;
// create objects
public void init()
status_a = 0;
status_b = 0;
status_c = 0;
// create container & panel
Container container = getContentPane();
Panel panel = new Panel( new FlowLayout( FlowLayout.LEFT));
container.add( panel );
// set up vertical boxlayout
Box box = Box.createVerticalBox();
Box inputbox1 = Box.createHorizontalBox();
Box inputbox2 = Box.createHorizontalBox();
Box inputbox3 = Box.createHorizontalBox();
Box buttonbox = Box.createHorizontalBox();
introduction_string = "This is the introduction";
// set up introduction
introductionArea = new JTextArea( introduction_string, 10, 50 );
introductionArea.setEditable( false );
box.add( new JScrollPane( introductionArea ) );
box.add( Box.createVerticalStrut (10) );
box.add( inputbox1);
// set up span
spanLabel = new JLabel( "span (feet)" );
spanField = new JTextField(5 );
inputbox1.add( spanLabel );
inputbox1.add( spanField );
Dimension minSize = new Dimension(5, 15);
Dimension prefSize = new Dimension(5, 15);
Dimension maxSize = new Dimension(Short.MAX_VALUE, 15);
inputbox1.add(new Box.Filler(minSize, prefSize, maxSize));
// set up chord
chordLabel = new JLabel( "chord (feet)" );
chordField = new JTextField(5 );
inputbox1.add( chordLabel );
inputbox1.add( chordField );
inputbox1.add(new Box.Filler(minSize, prefSize, maxSize));
// set up thickness
thicknessLabel = new JLabel( "thickness (feet)" );
thicknessField = new JTextField(5 );
inputbox1.add( thicknessLabel );
inputbox1.add( thicknessField );
inputbox1.add(new Box.Filler(minSize, prefSize, maxSize));
// set up mass
massLabel = new JLabel( "mass (slugs)" );
massField = new JTextField(5);
inputbox1.add( massLabel );
inputbox1.add( massField );
box.add( Box.createVerticalStrut (10) );
box.add( inputbox2);
// set up altitude
altitudeLabel = new JLabel( "altitude (feet)");
altitudeField = new JTextField(5 );
inputbox2.add( altitudeLabel );
inputbox2.add( altitudeField );
inputbox2.add(new Box.Filler(minSize, prefSize, maxSize));
// set up velocity
velocityLabel = new JLabel( "velocity (Mach Number)");
velocityField = new JTextField(5);
inputbox2.add( velocityLabel );
inputbox2.add( velocityField );
inputbox2.add(new Box.Filler(minSize, prefSize, maxSize));
// set up trajectory_angle
trajectory_angleLabel = new JLabel( "trajectory angle ( -90 degrees <= trajectory angle <= 90 degrees )");
trajectory_angleField = new JTextField(5);
inputbox2.add( trajectory_angleLabel );
inputbox2.add( trajectory_angleField );
box.add( Box.createVerticalStrut (10) );
box.add( inputbox3);
Dimension minSizeF = new Dimension(70, 15);
Dimension prefSizeF = new Dimension(70, 15);
Dimension maxSizeF = new Dimension(Short.MAX_VALUE, 15);
inputbox3.add(new Box.Filler(minSizeF, prefSizeF, maxSizeF));
// set up time_increment
time_incrementLabel = new JLabel( "time increment (seconds)" );
time_incrementField = new JTextField(5);
inputbox3.add( time_incrementLabel );
inputbox3.add( time_incrementField );
inputbox3.add(new Box.Filler(minSizeF, prefSizeF, maxSizeF));
// set up rotation_factor
rotation_factorLabel = new JLabel( "rotation factor ( non-negative number)" );
rotation_factorField = new JTextField(5);
inputbox3.add( rotation_factorLabel );
inputbox3.add( rotation_factorField );
inputbox3.add(new Box.Filler(minSizeF, prefSizeF, maxSizeF));
box.add( Box.createVerticalStrut (10) );
box.add( buttonbox);
// set up start
startButton = new JButton( "START" );
buttonbox.add( startButton );
Dimension minSizeB = new Dimension(10, 30);
Dimension prefSizeB = new Dimension(10, 30);
Dimension maxSizeB = new Dimension(Short.MAX_VALUE, 30);
buttonbox.add(new Box.Filler(minSizeB, prefSizeB, maxSizeB));
// set up reset
resetButton = new JButton( "RESET" );
buttonbox.add( resetButton );
buttonbox.add(new Box.Filler(minSizeB, prefSizeB, maxSizeB));
// set up cont
contButton = new JButton( "CONTINUE" );
buttonbox.add( contButton );
buttonbox.add(new Box.Filler(minSizeB, prefSizeB, maxSizeB));
// set up term
termButton = new JButton( "END" );
buttonbox.add( termButton );
box.add( Box.createVerticalStrut (10) );
// set up results
resultsArea = new JTextArea( results_string, 10, 50 );
resultsArea.setEditable( false );
box.add( new JScrollPane( resultsArea ) );
// add box to panel
panel.add( box );
// register event handlers
Handler handler = new Handler();
spanField.addActionListener( handler );
chordField.addActionListener( handler );
thicknessField.addActionListener( handler );
massField.addActionListener( handler );
altitudeField.addActionListener( handler );
velocityField.addActionListener( handler );
trajectory_angleField.addActionListener( handler );
time_incrementField.addActionListener( handler );
rotation_factorField.addActionListener( handler );
startButton.addActionListener( handler );
resetButton.addActionListener( handler );
contButton.addActionListener( handler );
termButton.addActionListener( handler );
} // end method init
// process handler events
public void actionPerformed( ActionEvent event )
// process resetButton event
if ( event.getSource() == resetButton )
reset();
// process contButton event
if ( event.getSource() == contButton )
cont();
// process endButton event
if ( event.getSource() == termButton )
// process span event
if( event.getSource() == spanField ) {
span = Double.parseDouble( event.getActionCommand() );
spanField.setText( span_string );
status_b++;
// process chord event
if( event.getSource() == spanField ) {
span = Double.parseDouble( event.getActionCommand() );
spanField.setText( chord_string );
status_b++;
// process thickness event
if( event.getSource() == thicknessField ) {
thickness = Double.parseDouble( event.getActionCommand() );
spanField.setText( thickness_string );
status_b++;
// process mass event
if( event.getSource() == massField ) {
mass = Double.parseDouble( event.getActionCommand() );
spanField.setText( mass_string );
status_b++;
// process altitude event
if( event.getSource() == altitudeField ) {
altitude = Double.parseDouble( event.getActionCommand() );
spanField.setText( altitude_string );
status_b++;
// process velocity event
if( event.getSource() == velocityField ) {
velocity = Double.parseDouble( event.getActionCommand() );
spanField.setText( velocity_string );
status_b++;
// process trajectory_angle event
if( event.getSource() == trajectory_angleField ) {
trajectory_angle = Double.parseDouble( event.getActionCommand() );
spanField.setText( trajectory_angle_string );
status_b++;
// process time_increment event
if( event.getSource() == time_incrementField ) {
time_increment = Double.parseDouble( event.getActionCommand() );
spanField.setText( time_increment_string );
status_b++;
// process rotation_factor event
if( event.getSource() == rotation_factorField ) {
rotation_factor = Double.parseDouble( event.getActionCommand() );
spanField.setText( rotation_factor_string );
status_b++;
// process startButton event
if ( event.getSource() == startButton && status_b == 9 ) {
strtb();
} // end method event handler
public void strtb()
startButton.addActionListener(
new ActionListener() { // anonymous inner class
// set text in resultsArea
public void actionPerformed( ActionEvent event )
calculate();
results();
resultsArea.setText( results() );
}// end method actionPerformed1
} // end anonymous inner class1
); // end call to addActionlistener1
} // end method strtb
public void reset()
resetButton.addActionListener(
new ActionListener() { // anonymous inner class
// set text in resultsArea
public void actionPerformed( ActionEvent event )
span_string = "";
chord_string = "";
thickness_string = "";
mass_string = "";
altitude_string = "";
velocity_string = "";
trajectory_angle_string = "";
time_increment_string = "";
rotation_factor_string = "";
results_string = "";
spanField.setText( span_string );
chordField.setText( chord_string );
thicknessField.setText( thickness_string );
massField.setText( mass_string );
altitudeField.setText( altitude_string );
velocityField.setText( velocity_string );
trajectory_angleField.setText( trajectory_angle_string );
time_incrementField.setText( time_increment_string );
rotation_factorField.setText( rotation_factor_string );
resultsArea.setEditable( true );
resultsArea.setText( results_string );
resultsArea.setEditable( false );
span = 0;
chord = 0;
thickness = 0;
mass = 0;
altitude = 0;
velocity = 0;
trajectory_angle = 0;
time_increment = 0;
rotation_factor = 0;
distance = 0;
velocity_fps = 0;
elapsed_time = 0;
} // end method actionPerformed2
} // end anonymous inner class2
); // end call to addActionlistener2
} // end method reset
public void cont()
//later
public void calculate()
distance = 1;
altitude = 2;
trajectory_angle = 3;
velocity_fps = 4;
elapsed_time = 5;
public String results()
results_string =
"Distance =\t\t" + distance + " miles\n"
+ "Altitude =\t\t" + altitude + " feet\n"
+ "Trajectory Angle =\t" + trajectory_angle + " degrees\n"
+ "Velocity =\t\t" + velocity_fps + " feet per second\n"
+ "Elapsed Time =\t\t" + elapsed_time + " seconds\n"
+ "\nstatus_a = " + status_a + "\nstatus_b = "
+ status_b + "\nstatus_c = " + status_c;
return results_string;
public void start()
if(status_a == 0 )
strtb();
if (status_b == 0)
reset();
}// end method start
} //end class trajectory_b
Maybe you are looking for
-
Is the mac book pro good for gaming?
Is it good for heavy minecraft work? And which core should I get? Thanks
-
I have Freehand MX from the Studio MX2004 suite I bought a few years back. Since then I've upgraded to Studio 8, and now again to CS 3 (which is awesome). I don't normally use freehand, and I used to use it on my PC, but I've moved across to Mac (Stu
-
BANK ID Maintenance in BSEG table HBK id
Helo SAP Experts, Can anyone tell me, BSEG table HBK ID where BANK id will maintain. thanks
-
Error Message " Line items reduce the cut-off value by 262,499 "
Hi, User was doing selling the assets and while posting the document in FB05 , user is getting this message that "Line items reduce the cut-off value by 262499 " Msg No. AA632. why this message is coming and the exact meaning of this error. Sachin
-
LG Spectrum doesn't hold charge after latest update
About 2 weeks ago my phone automatically updated overnight. I was surprised the next morning to find a different look on my phone and having to change things back to my settings. Since then, my phone won't hold a charge for more than 5-6 hours. It