How to modify HTML immediatley after loading it??

I have created a web browser and I need it to have large text size as default (i.e as soon as a web page is loaded). I have written the code to do this and it works when assigned to a Jbutton.
However if use the doClick() method to invoke the button immediatley after the HTML page is loaded(using the setPage method) the HTML remains the same.
There was a suggestion that the font resizing is being done before the document is fully loaded. So I tried to synchronize the thread of my largeText method and delay execution of the doClick by using the SwingUtilities.invokeLater method.
This never worked does anybody have a solution to this problem??
Below is the code of my Display and largetext methods.
if (e.getSource().equals(largeText)){
Thread runner = new Thread() {
public synchronized void run() {
HTMLDocument doc = ((HTMLDocument) htmlMain.getDocument());
doc.setCharacterAttributes(0, htmlMain.getDocument().getLength(), doc.getStyleSheet()
.getDeclaration("font-size:24"), false);
runner.start();
SwingUtilities.invokeLater(runner);
} // End if
public void DisplayPage(String strURL) {
currentURL = strURL;
textURL.setText(strURL);
//m_btnReload.setToolTipText(strURL);
try {
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
htmlMain.setPage(strURL);
SwingUtilities.invokeLater(new Runnable() {
public void run() {
largeText.doClick();
catch (Exception exc) {
htmlMain.setText("");
statusBar.setText("Could not open starting page. Using a blank.");
finally {
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
} //end try
//largeText.doClick();
}

You didn't set the width and height to 20. You set the
magnification to 20 percent. That's what _xscale and _yscale are:
the percentage by which an object is scaled (enlarged or reduced).
If you want to set an image's actual width and height:
image._width = 20;
image._height = 20;

Similar Messages

  • How to move flat file after loading in owb to other directory with othernam

    Hi All,
    I wast struck in problem . after loading the flat file in owb that file should be move or rename or zip with Date everyday .
    I dont know how to achieve this issue in owb via proceudre or any other way ... .
    how to zip files from pl/sql procedure ...... with sysdate.zip.
    any one please help me in this problem to come out soon.
    thanks ,
    murari

    One way is to use a Java stored procedure, this can then be called from a map or a process flow. The Java stored procedure will use the Zip capabilities in Java to do what you need. For example you will need the following procedure and you will have to grant privileges for your file to ZIP and the entire directory for zipping into (since the file name will be dynamic):
    For example grant YOURSCHEMA (change to your tgt schema) read on your extract directory where your file to zip is and write on your zips directory (where the zips will go);
    exec dbms_java.grant_permission('YOURSCHEMA', 'SYS:java.io.FilePermission', 'c:\staging\extracts\*','read');
    exec dbms_java.grant_permission('YOURSCHEMA', 'SYS:java.io.FilePermission', 'c:\staging\zips\*', 'write' )
    You can then create your procedure which you can invoke
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "otnZipFile"
    AS
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipOutputStream;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    public class otnZipFile
    public static void zipFile(String zip, String filename)
    byte[] buf = new byte[1024];
    try {
    String outFilename = zip;
    ZipOutputStream out = new ZipOutputStream(new FileOutputStream(outFilename));
    FileInputStream in = new FileInputStream(filename);
    out.putNextEntry(new ZipEntry(filename));
    int len;
    while ((len = in.read(buf)) > 0) {
    out.write(buf, 0, len);
    out.closeEntry();
    in.close();
    out.close();
    } catch (IOException e) {
    create or replace PROCEDURE zip_file(
    dir IN VARCHAR2,
    file_name IN VARCHAR2) IS
    LANGUAGE JAVA NAME 'otnZipFile.zipFile(java.lang.String, java.lang.String)';
    For example here I zip a file MYCSV.csv into the zip file MYZIP.zip
    exec zip_file('c:\staging\zips\MYZIP.zip', 'c:\staging\extracts\MYCSV.csv');
    Cheers
    David

  • How to Format DataTable Column after load Datatable without extra loop ??

    How to Format Column after load Datatable without extra loop ??
    I dont want to do extra logic which can cause performance thing.
    I have datatable which get fill from Dataset after database query, now i need to format column as decimal but without extra logic.
    I was thinking to create clone and than Import row loop but it ll kill performance, its WPF application.
    Thanks
    Jumpingboy

    You cannot do any custom things at all without doing some "extra logic". Formatting a number as decimal is certainly not a performance killer in any way whatsoever though.
    If you are displaying the contents of the DataTable in a DataGrid you could specify a StringFormat in the XAML:
    <DataGrid x:Name="dg1" AutoGenerateColumns="False">
    <DataGrid.Columns>
    <DataGridTextColumn Header="Number" Binding="{Binding num, StringFormat=N2}"/>
    </DataGrid.Columns>
    </DataGrid>
    Or if you are using auto-generated columns you could handle the AutoGeneratingColumn event:
    public MainWindow() {
    InitializeComponent();
    DataTable table1 = new DataTable();
    table1.Columns.Add(new DataColumn("num")
    DataType = typeof(decimal)
    table1.Rows.Add(1.444444444444);
    table1.Rows.Add(7.444444444444);
    dg1.ItemsSource = table1.DefaultView;
    dg1.AutoGeneratingColumn += dg1_AutoGeneratingColumn;
    void dg1_AutoGeneratingColumn(object sender, DataGridAutoGeneratingColumnEventArgs e) {
    if (e.PropertyName == "num") {
    DataGridTextColumn column = e.Column as DataGridTextColumn;
    column.Binding.StringFormat = "N2";
    <DataGrid x:Name="dg1" />
     Please remember to mark helpful posts as answer and/or helpful.

  • How to make Matlab work after loading Yosemite ?

    How to make Matlab work after leading Yosemite on a Macbook pro ?

    R2014b should work with Yosemite. What version do you have?

  • How to increase BoundingSphere radius after loading .3ds model

    I can properly load in all .3ds models, however, after loading them into the canvas some .3ds models are far too large. When I zoom out (by pushing the model back with MouseZoom) the model disappears from view even though I have the boundingsphere declared as:
    BoundingSphere bounds = new BoundingSphere(new Point3d(), Double.POSITIVE_INFINITY);
    I add the loaded model (transformgroup.addChild(model.getSceneGroup());) and this contains the bounds as shown above.
    The weird thing is when I load .obj files using the same method it works fine. I can zoom out on these objects to infinity (until they are small dots).
    Why are the .3ds models disappearing from the bounds even when I have them set to POSITIVE INFINITY?
    Any ideas? Thanks.

    Try the Java 3D forum: [http://forums.sun.com/forum.jspa?forumID=21]

  • Modifying Sequence directly after loading the sequences

    Hi,
    I'm planning to write some kind of profiler to find out which step consums the most testtime.
    Therefore I'm using the Engine Callbacks SequenceFilePreStep and SequenceFilePostStep.
    Whenever a Step in the sequence is executed the SequenceFilePreStep generates a timestamp and after the execution of the step the SequenceFilePostStep generates another timestamp. Both timestamps can be used to estimate how long that step was executed.
    I'm using many different sequence files (e.g. one sequence fiel for feature A another sequence file for feature B and so on).
    A sequence file can be called (loaded) from both the top level sequence file or from any other sequence file.
    My problem is, that I don't want to modify each of the sequence files. The profiling should rather be initited automatically.
    My idea is, that the process model will add the above mentioned subsequences into every sequence file that is used during execution of the testplan.
    Any Idea how to implement that?  As far as I have seen there is no ProcessModel callback which is called whenever a sequence file is loaded, isn't it?
    Many Thanks,
    Thorsten
    I forgot to mention, I'm using Teststand 3.1 currently, but planning to change to 4.x
    Message Edited by Tho_Wa on 10-30-2008 01:48 AM
    Solved!
    Go to Solution.

    Hi Thorsten,
    That would be a great product suggestion- StationFileLoad callback.  So in the TestStand Reference Manual in Chapter 10 there is an awesome table that shows all the Engine Callbacks (table 10-1).  It shows where the callbacks should be used and what not.  Basically the ProcessModelPreStep and ProcessModelPostStep might be what you are looking for.  You'll Notice that it states: Before the engine executes each step in any client sequence file that the process model calls, and each step in any resulting subsequence calls.
    So why not just use these?  The step is being passed as a parameter so you have access to it.
    Let me know if you have any questions,
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • How to modify LobSystemInstance properties after deployment

    Hi,
    I've added some properties to my LOBSystemInstance (like explained here:http://social.technet.microsoft.com/Forums/en-US/sharepoint2010programming/thread/01ad2bf2-7ebc-434f-beac-e2d934847b34)
    I cannot find where to modify the properties once the BDC is deployed.
    Is it possible to have an administrator change the property values once the BDC is deployed? For instance when a DB password changes?
    regards, Felix

    Hi Felix,
    You need to be using a custom connector to be able to use those properties and interfaces.
    I have managed to get those elusive properties you are after, I followed the book from Scot Hiller and also this blog:
    http://jardalu.blogspot.com/2010/03/writing-custom-connector-for-bcs.html
    I have written an internal document for us at Lightning Tools explaining how to transform a BCS Meta Man project to a Custom Connector. This is the full model I used
    <?xml version="1.0" encoding="utf-8"?>
    <Model Name="CustomConnectorMashupLobSystemModel" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/windows/2007/BusinessDataCatalog">
    <LobSystems>
    <LobSystem Name="CustomConnectorMashupLobSystem" Type="Custom">
    <Properties>
    <Property Type="System.String" Name="SystemUtilityTypeName">CustomConnectorMashup.Custom.Connector, CustomConnectorMashup, Version=1.0.0.0, Culture=neutral, PublicKeyToken=02df3463d06f0080</Property>
    </Properties>
    <LobSystemInstances>
    <LobSystemInstance Name="CustomConnectorMashupLobSystemInstance">
    <Properties>
    <Property Name="ConnectionString" Type="System.String">Persist Security Info=False; Integrated Security=SSPI; Server=.\;Connect Timeout=30;Database=AdventureWorksLT;</Property>
    </Properties>
    </LobSystemInstance>
    </LobSystemInstances>
    <Entities>
    <Entity Name="Product" Namespace="CustomConnectorMashup.Model" Version="20.0.0.0">
    <Properties>
    <Property Name="OriginalTableName" Type="System.String">[SalesLT].[Product]</Property>
    <Property Name="IsCustomCode" Type="System.Boolean">false</Property>
    <Property Name="Class" Type="System.String">CustomConnectorMashup.Model.ProductEntityService, CustomConnectorMashupLobSystem</Property>
    <Property Name="Title" Type="System.String">Name</Property>
    </Properties>
    <Identifiers>
    <Identifier Name="ProductID" TypeName="System.Int32" />
    </Identifiers>
    <Methods>
    <Method Name="Test">
    <Parameters>
    <Parameter Name="returnParameter" Direction="Return">
    <TypeDescriptor Name="ProductList" TypeName="System.Collections.Generic.IEnumerable`1[[CustomConnectorMashup.Model.GetAllProductEntitysProperties, CustomConnectorMashup, Version=1.0.0.0, Culture=neutral, PublicKeyToken=02df3463d06f0080]]" IsCollection="true">
    <TypeDescriptors>
    <TypeDescriptor Name="Product" TypeName="CustomConnectorMashup.Model.GetAllProductEntitysProperties, CustomConnectorMashup, Version=1.0.0.0, Culture=neutral, PublicKeyToken=02df3463d06f0080">
    <TypeDescriptors>
    <TypeDescriptor Name="ProductID" TypeName="System.Int32" IdentifierName="ProductID" ReadOnly="true" />
    <TypeDescriptor Name="Name" TypeName="System.String" />
    </TypeDescriptors>
    </TypeDescriptor>
    </TypeDescriptors>
    </TypeDescriptor>
    </Parameter>
    </Parameters>
    <MethodInstances>
    <MethodInstance Name="Test" DefaultDisplayName="FinderTest" Type="Finder" ReturnParameterName="returnParameter" />
    </MethodInstances>
    </Method>
    </Methods>
    </Entity>
    </Entities>
    </LobSystem>
    </LobSystems>
    </Model>
    This was my connector class
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using CustomConnectorMashup.Model;
    using Microsoft.BusinessData.Infrastructure;
    using Microsoft.BusinessData.MetadataModel;
    using Microsoft.BusinessData.Runtime;
    namespace CustomConnectorMashup.Custom
    public class Connector : ISystemUtility, IAdministrableSystem
    #region IAdministrableSystem Members
    public IList<AdministrableProperty> AdministrableLobSystemProperties
    get { return null; }
    public IList<AdministrableProperty> AdministrableLobSystemInstanceProperties
    get
    return new List<AdministrableProperty>
    // Add the Connection String to the Administrable Properties so it can be changed in Central Administration
    new AdministrableProperty("Connection String", "The Connection String", typeof (string), "ConnectionString", typeof (string), true)
    #endregion
    public IEnumerator CreateEntityInstanceDataEnumerator(object rawStream, ISharedEntityState sharedEntityState)
    var enumerableStream = rawStream as IEnumerable;
    if (enumerableStream != null)
    return enumerableStream.GetEnumerator();
    throw new InvalidOperationException("Invalid stream returned");
    public ITypeReflector DefaultTypeReflector
    get { return null; }
    public IConnectionManager DefaultConnectionManager
    get { return null; }
    public void ExecuteStatic(IMethodInstance methodInstance, ILobSystemInstance lobSystemInstance, object[] args,
    IExecutionContext context)
    if (methodInstance == null)
    throw (new ArgumentNullException("methodInstance"));
    if (lobSystemInstance == null)
    throw (new ArgumentNullException("lobSystemInstance"));
    if (args == null)
    throw (new ArgumentNullException("args"));
    // Read Connection string from LobSystem Instance
    var connectionString = lobSystemInstance.GetProperties()["ConnectionString"] as string;
    switch (methodInstance.MethodInstanceType)
    case MethodInstanceType.Finder:
    // Added switch to allow multiple instances of each type
    switch (methodInstance.Name)
    case "Test":
    ExecuteTestMethod(connectionString, args);
    break;
    break;
    default:
    throw new NotImplementedException("Only Finder Method Implemented");
    private static void ExecuteTestMethod(string connectionString, object[] args)
    // Call default method and assign to 0 index of args
    args[0] = ProductEntityService.TestMethod(connectionString);
    I hope this helps a bit, I do have a project that worked for me that I could send to you to pick apart if that would be helpful. I think I might need to write a blog post so others can benefit from it.
    All the best
    Phill
    helpful? …please mark it so!
    Lightning Tools Check out our SharePoint Tools and Web Parts
    BCS Meta Man Automatic BCS Model Generation
    BCS Tester Man Open Source BCS test client

  • How to modify a PDF after signing

    Our company has recently been upgrading from Adobe 8 to Adobe X (more specifically 10.1.10.) In Adobe 8 there is an ability to add/subtract pages after a signature has been signed, however this does not work in Adobe X with the default settings and I have not located a way to adjust this. Within the company there is a department in legal/accounting that handles the creation of PDF documents from basically start to finish. During their creation process there needs to be two signature: one for the creator of the document (this field is important enough that I cannot simply copy an ID/key so that anyone can sign anyone’s name however it is not important enough that it needs to lock a document or prevent any changes including adding/subtracting pages.) The creator will start a document sign and then pass it on where it will be modified, pages will be added/subtracted and words may be rearranged. Once it has been revised a couple to even a few time a second signature will lock the document. Is this still possible in Adobe Acrobat X Pro or Standard? Thank you in advance.

    AFAIK the signature validation rules were significantly strengthen in Acrobat 9 and later. I do not remember whether adding pages was among those. BTW, by "subtracting pages"do you mean "deleting pages"? You could never delete a page in a signed document without invalidating the signature. Generally, in order to be able to modify signed PDF the original PDF, before the first signature, needs to be certified with certification permissions for specific actions, like permission to add more signature and fill form fields. You can certify the original PDF in Acrobat and its UI gives you a few certification permissions options. Adding pages is not in this list. LiveCycle has a more elaborate set of certification permissions but this is a fairly expensive solution and I do not remember whether Adding pages is in its permissions list.

  • How to put HTML content after the following java code in the JSP

    Hello Guys :),
    In the following jsp I force the user to download a file but I am not able to perform any action after I do this. I want to put some HTML code in this jsp at the end so that user has the option of doing other things after downloading the file.
    Any solution will be highly appreciated :)
    Thanks
    <%@ page import="java.util.*,java.io.*"%>
    <script language="JavaScript" src="common.js"></script>
    <%
    Hashtable hashTable = (Hashtable)session.getAttribute("platformAndSampleInfo");
    Date date = (Date)hashTable.get("date");
    String userName = (String)hashTable.get("userName");
    String dateString = date.toString().substring(0, date.toString().length()-9).replace(' ','_');
    dateString = dateString.replace(':','_');
    String fileExtension = (String)session.getAttribute("fileExtension"); //,getFileExtension(request));
    String outputFile = userName + dateString + fileExtension;
         File f = new File (outputFile);
         response.setContentType("APPLICATION/OCTET-STREAM");
         response.setHeader ("Content-Disposition", "attachment; filename=\""+ f.getName() + "\"");
    InputStream in = new FileInputStream(f);
         ServletOutputStream outs = response.getOutputStream();
              int bit = 256;
              int i = 0;
              try {
                   while ((bit) >= 0) {
                        bit = in.read();
                        outs.write(bit);
              } catch (IOException ioe) {
                   ioe.printStackTrace(System.out);
              outs.flush();
              outs.close();
              in.close();     
    %>
    <!--
    The following piece of HTML code is never reached
    -->
    <html>
    Want to display this
    <html>

    Thats odd.. try using out to print the character
    inst of creating the instance outs.. Maybe your
    overiding something.
    ex)
    char c='s';
    out.print(c);
    //the jsp will create the instance of out for you.

  • Dynamic plug-ins: How to dispatch MediaFactoryEvent.PLUGIN_LOAD after loading external swf

    Hi,
    I'm creating a dynamic OSMF plugin. That plugin needs to load external SWF file before sending the PLUGIN_LOAD event to the player.
    How can I override the dispatch of the PLUGIN_LOAD event on my MyCustomPluginPluginInfo custom class ?
    If it's not possible, the solution is to create a new MediaElement within my MyCustomPluginPluginInfo:
    var mediaElement:MediaElement = mediaFactory.createMediaElement( new URLResource(null) ); //the resource is null at this point
    On the player side I add that line when the plugin is loaded successfully:
    //Add listener on Media Element creation
    mediaFactory.addEventListener(MediaFactoryEvent.MEDIA_ELEMENT_CREATE, onMediaElementCreate);
    Is it a god solution or not ?
    Is there another way to do that ?
    Thanks !

    Hello!
    I'm not sure you can do it through loadPlugin stage due to an swf loader is used in factory on that moment.
    As for loading an extra swf "per instance" way I'd rather do it using an element LoadTrait than try to bypass the standard factory way.
    Regards!

  • How to modify clip borders after "Open in Timeline"?

    I have a little clip in the main timeline history and I make "Open in Timeline". Now I can't modify the clip borders from inside this internal timeline. I thought I could grab the side arrows and extend or shorten this clip but I can't. Am I missing something???

    Why would you want to do that?!
    There are very few situations where one would be advised to use this.
    Instead, if you want to use a larger section of the clip, drag it to a project timeline and extend by draggind the yellow lines at the ends of the clip.

  • How do you close windows after loading ios7

    How do you close apps/windows in ios7?

    Try closing all apps in Multitask Window
    1. Double tap the home button to bring up the multi-tasking view
    2. Swipe up on the screenshot of the app you want to exit.
    3. The app will fly off the screen

  • LOVs - how to modify same LOV  after items are selected.

    Hi all, I have a Record Group which returns a list of Staff Surnames.
    I also have a LOV that uses that Record Group. I have a Project-Staff table that has a composite primary key of project_id and staff_id.
    What I need to do is dynamically change the contents of the LOV so that when a staff name is selected their name no longer appears in the LOV for that project.(their staff_id gets written to the Project-Staff table along with the project_id).
    Its just a simple form for allocating staff to a project. Any ideas on how I should formulate the SQL statement ? I'm stuck because if the project needs lots of staff, MY SQL statement would look a right mess.
    Thanks.

    Thanks guys. I got the delete_group_row to work. Unfortunately I can't get it to work how I would like it to.
    Once the user selects a name from the list (using LOV) and executes the query, the selected staff name and some of their staff details populate the form. I have created an "Add Staff" button and once it is pressed the staff_id for that staff member and function_id will be written into the Function-Staff table. The Form is then cleared. The next time the user accesses the LOV I want the previously selected name to be omitted from the list.
    If I hard code the row number to be deleted "delete_group_row('fname_rg',1);" it deletes that record perfectly. But hard coding the row to be deleted is no good to me. Is there a way of finding out what the row number is for the name selected and pass that to the delete_group_row built in ?
    Or am I simply missing something here ??

  • Modify HTML Field Security Using Powershell or C#

    I searched a lot but not able to find out how to Modify HTML Field Security in SP2013 Using Powershell or C#
    Need help..!!

    I got it, using powershell
     $web.ScriptSafeDomains.Add("example.com")

  • How to return a html repsonse after form guide rendering in browser?

    How to return a html repsonse after form guide rendering in browser indicating that server has recieved transmission and request is submitted succesfuly?
    I am rendering the form guide in browser using guide invoke service and when i submit the data in browser to server through guide , it is displaying some random number in browser?
    i need to display a resposne that request is submitted successfully?

    how could i define a variable with "html data" ?
    Create a variable of type document and then a service to read the html from where ever it's located. If you put it in LiveCycle, you can use the ReadRessource service. If it's on the file system, you can use the Read Document. If it's in the database, you can use the JDBC service.
    Also, one more doubt where should i use this variable in my process to get the same?
    You want the response once you've submitted the data, so the html is really the result of calling the process that's processing the data. So I would create an output variable of type document on that process.
    Right now it displays a random number in the browser because your submit process is long lived. When a process is long lived (asynchronous), you invoke it and then you get an identifier back. It's kind of a fire and forget. You can use that identifier to check the status of the long lived process, since long lived processes can take hours, days to complete. You don't want your browser to wait that long, hence the identifier.
    However if you change the process to be short lived (synchronous), the browser will wait for the result of the process, which really means the output variables for that process. If your output variable contains html, it'll display html.
    So the key is make you submit process short lived and populate the output variables appropriately.
    Jasmin

Maybe you are looking for

  • Should I install 5.0.1 on iPhone 3?

    I have an old iPhone 3, currently running 4.3.5. When I sync it to my computer iTunes suggests I upgrade to 5.0.1. Is this a good or bad idea? In other news, my phone is becoming increasingly slow and feeble, really not sure why. But apps take foreve

  • HT3529 How do you turn off the voice in auto correct when messaging?

    How do you turn off the voice when trying to write a message to someone?

  • Periodic account Archive

    Hi I have a query,    When executing transaction F.27 it is not selecting archived items from the AIS for inclusion on the statement. How would we know whether  it is designed to read AIS tables or if it is only meant to read the database tables e.g.

  • Image Capture - Download?

    My computer was running low on memory, so I deleted some programs that I thought I'd never use. (Seeing as this is mostly my 'away from home, connect to internet only' computer, I didn't think I'd need a lot of the programs.) It looks like I needed I

  • Global or external activation of events?

    Dear all, I need to know when the flash player enters or exits rebuffering, and when download of a video is completed. I know this can be done by activation in a script, but this won't work in my case. I'd rather need to activate this globally, e.g.