Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Strike through Font?? is this possible in SWT
Strike through Font?? is this possible in SWT [message #448174] Tue, 04 January 2005 15:40 Go to next message
Eclipse User
Originally posted by: wiz.vball.net

Hi,

I notice that the current styles are only BOLD, NORMAL and ITALIC for
Font

is there any custom Font classes that also allow strike through to be
used for common widgets like label or table item. Please help because
I'm trying to figure out a way to do this.

thank you
Re: Strike through Font?? is this possible in SWT [message #448193 is a reply to message #448174] Wed, 05 January 2005 09:56 Go to previous messageGo to next message
Steve Northover is currently offline Steve Northover
Messages: 1636
Registered: July 2009
Senior Member
Strike through fonts are only available on Windows. You will need platform
specific code to create them.

"FireFly" <wiz@vball.net> wrote in message
news:nkvlt0l93159a57vlq0lv3fnmrksbjce0v@4ax.com...
> Hi,
>
> I notice that the current styles are only BOLD, NORMAL and ITALIC for
> Font
>
> is there any custom Font classes that also allow strike through to be
> used for common widgets like label or table item. Please help because
> I'm trying to figure out a way to do this.
>
> thank you
>
Re: Strike through Font?? is this possible in SWT [message #448252 is a reply to message #448193] Wed, 05 January 2005 20:48 Go to previous messageGo to next message
Eclipse User
Originally posted by: wiz.vball.net

Any pointers or tutorials on how to go about getting strike through in
Windows then.

On Wed, 5 Jan 2005 09:56:55 -0500, "Steve Northover"
<steve_northover@ca.ibm.com> wrote:

>Strike through fonts are only available on Windows. You will need platform
>specific code to create them.
>
>"FireFly" <wiz@vball.net> wrote in message
>news:nkvlt0l93159a57vlq0lv3fnmrksbjce0v@4ax.com...
>> Hi,
>>
>> I notice that the current styles are only BOLD, NORMAL and ITALIC for
>> Font
>>
>> is there any custom Font classes that also allow strike through to be
>> used for common widgets like label or table item. Please help because
>> I'm trying to figure out a way to do this.
>>
>> thank you
>>
>
Re: Strike through Font?? is this possible in SWT [message #448307 is a reply to message #448252] Thu, 06 January 2005 13:31 Go to previous messageGo to next message
Eclipse User
Originally posted by: wiz.vball.net

nevermind I figured it out...
for others that might need this if you are on windows you can
do something like so...

FontData fontData = label.getFont().getFontData()[0];
fontData.data.lfStrikeOut = 1;
Font font = new Font( parent.getDisplay(), fontData );

On Wed, 05 Jan 2005 17:48:28 -0800, FireFly <wiz@vball.net> wrote:

>Any pointers or tutorials on how to go about getting strike through in
>Windows then.
>
>On Wed, 5 Jan 2005 09:56:55 -0500, "Steve Northover"
><steve_northover@ca.ibm.com> wrote:
>
>>Strike through fonts are only available on Windows. You will need platform
>>specific code to create them.
>>
>>"FireFly" <wiz@vball.net> wrote in message
>>news:nkvlt0l93159a57vlq0lv3fnmrksbjce0v@4ax.com...
>>> Hi,
>>>
>>> I notice that the current styles are only BOLD, NORMAL and ITALIC for
>>> Font
>>>
>>> is there any custom Font classes that also allow strike through to be
>>> used for common widgets like label or table item. Please help because
>>> I'm trying to figure out a way to do this.
>>>
>>> thank you
>>>
>>
Re: Strike through Font?? is this possible in SWT [message #448401 is a reply to message #448307] Fri, 07 January 2005 17:39 Go to previous messageGo to next message
Steve Northover is currently offline Steve Northover
Messages: 1636
Registered: July 2009
Senior Member
.... but your code will be Windows specific.

"FireFly" <wiz@vball.net> wrote in message
news:0s0rt013phhogltpu1potje9fm6v0th8fq@4ax.com...
> nevermind I figured it out...
> for others that might need this if you are on windows you can
> do something like so...
>
> FontData fontData = label.getFont().getFontData()[0];
> fontData.data.lfStrikeOut = 1;
> Font font = new Font( parent.getDisplay(), fontData );
>
> On Wed, 05 Jan 2005 17:48:28 -0800, FireFly <wiz@vball.net> wrote:
>
> >Any pointers or tutorials on how to go about getting strike through in
> >Windows then.
> >
> >On Wed, 5 Jan 2005 09:56:55 -0500, "Steve Northover"
> ><steve_northover@ca.ibm.com> wrote:
> >
> >>Strike through fonts are only available on Windows. You will need
platform
> >>specific code to create them.
> >>
> >>"FireFly" <wiz@vball.net> wrote in message
> >>news:nkvlt0l93159a57vlq0lv3fnmrksbjce0v@4ax.com...
> >>> Hi,
> >>>
> >>> I notice that the current styles are only BOLD, NORMAL and ITALIC for
> >>> Font
> >>>
> >>> is there any custom Font classes that also allow strike through to be
> >>> used for common widgets like label or table item. Please help because
> >>> I'm trying to figure out a way to do this.
> >>>
> >>> thank you
> >>>
> >>
>
Jvm is always crashed when I get the property of a activex using swt. [message #448932 is a reply to message #448193] Fri, 14 January 2005 22:15 Go to previous messageGo to next message
Eclipse User
Originally posted by: agile.java.gmail.com

I'm working on activex supported by swt,and when I run the test application
jvm is always crashed.:(
Who can help me,tks.

The idl which I used is:
HRESULT
Match_MntStr( BSTR pStr1, BSTR pStr2,
double *pVal);


Here is my application:

public class ActivexTest {
public static void main(String[] args){
Display display = new Display();
Shell shell = new Shell(display);
OleFrame frame = new OleFrame(shell, SWT.NONE);
OleControlSite controlSite =
new OleControlSite(frame, SWT.NONE, "DFZJDev.ObjCtrlDev.1");
OleAutomation automation = new OleAutomation(controlSite);

int[] rgdispid =
automation.getIDsOfNames(new String[] { "Match_MntStr"});
int dispIdMember = rgdispid[0];


char[] str = ("test"+"\0").toCharArray();
char[] str2 = ("test2"+"\0").toCharArray();

int ptr = COM.SysAllocString(str);
int ptr2 = COM.SysAllocString(str2);

short byRefType = OLE.VT_BSTR | OLE.VT_BYREF;
Variant test = new Variant(ptr,byRefType);
Variant test2 = new Variant(ptr2,byRefType);

Variant result = automation.getProperty(dispIdMember,new
Variant[]{test,test2});
System.out.println(result.getString());
display.dispose();
}
}

This is the jvm log:

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_IN_PAGE_ERROR (0xc0000006) occurred at
PC=0x1854B9BA
Function=Java_org_eclipse_swt_internal_win32_OS_SendMessageW __II_3I_3I+0x17D
B
Library=E:\eclipse3.1m4\eclipse\plugins\org.eclipse.swt.win3 2_3.1.0\os\win32
\x86\swt-win32-3116.dll

Current Java thread:
at org.eclipse.swt.internal.win32.OS.WaitMessage(Native Method)
at org.eclipse.swt.widgets.Display.sleep(Display.java:3108)
at
org.eclipse.ui.application.WorkbenchAdvisor.eventLoopIdle(Wo rkbenchAdvisor.j
ava:346)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1570)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1540)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:285)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:144)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:102)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
java:220)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:273)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
at org.eclipse.core.launcher.Main.run(Main.java:710)
at org.eclipse.core.launcher.Main.main(Main.java:694)

Dynamic libraries:
0x00400000 - 0x00407000 C:\WINNT\system32\javaw.exe
0x77F80000 - 0x77FFB000 C:\WINNT\system32\ntdll.dll
0x796D0000 - 0x79732000 C:\WINNT\system32\ADVAPI32.dll
0x77E60000 - 0x77F38000 C:\WINNT\system32\KERNEL32.DLL
0x786F0000 - 0x7875E000 C:\WINNT\system32\RPCRT4.DLL
0x77DF0000 - 0x77E55000 C:\WINNT\system32\USER32.dll
0x77F40000 - 0x77F7C000 C:\WINNT\system32\GDI32.DLL
0x78000000 - 0x78045000 C:\WINNT\system32\MSVCRT.dll
0x75E00000 - 0x75E1A000 C:\WINNT\system32\IMM32.DLL
0x6C330000 - 0x6C338000 C:\WINNT\system32\LPK.DLL
0x65D20000 - 0x65D74000 C:\WINNT\system32\USP10.dll
0x08000000 - 0x08138000 C:\Program
Files\Java\j2re1.4.2_03\bin\client\jvm.dll
0x77530000 - 0x77560000 C:\WINNT\system32\WINMM.dll
0x10000000 - 0x10007000 C:\Program Files\Java\j2re1.4.2_03\bin\hpi.dll
0x007F0000 - 0x007FE000 C:\Program Files\Java\j2re1.4.2_03\bin\verify.dll
0x00800000 - 0x00819000 C:\Program Files\Java\j2re1.4.2_03\bin\java.dll
0x00820000 - 0x0082D000 C:\Program Files\Java\j2re1.4.2_03\bin\zip.dll
0x18500000 - 0x1850F000 C:\Program Files\Java\j2re1.4.2_03\bin\net.dll
0x74FB0000 - 0x74FC4000 C:\WINNT\system32\WS2_32.dll
0x74FA0000 - 0x74FA8000 C:\WINNT\system32\WS2HELP.DLL
0x18510000 - 0x18518000 C:\Program Files\Java\j2re1.4.2_03\bin\nio.dll
0x18530000 - 0x1857F000
E:\eclipse3.1m4\eclipse\plugins\org.eclipse.swt.win32_3.1.0\ os\win32\x86\swt
-win32-3116.dll
0x77A30000 - 0x77B1C000 C:\WINNT\system32\ole32.dll
0x71710000 - 0x71794000 C:\WINNT\system32\COMCTL32.dll
0x76AF0000 - 0x76B2E000 C:\WINNT\system32\comdlg32.dll
0x63180000 - 0x631E5000 C:\WINNT\system32\SHLWAPI.DLL
0x78F90000 - 0x791D8000 C:\WINNT\system32\SHELL32.DLL
0x77990000 - 0x77A2B000 C:\WINNT\system32\OLEAUT32.dll
0x6DD30000 - 0x6DD36000 C:\WINNT\system32\INDICDLL.dll
0x18ED0000 - 0x18ED8000
E:\eclipse3.1m4\eclipse\plugins\org.eclipse.core.resources.w in32_3.0.0\os\wi
n32\x86\core_3_1_0.dll
0x68EF0000 - 0x68F0F000 C:\WINNT\system32\oleacc.dll
0x77800000 - 0x7780C000 C:\WINNT\System32\rnr20.dll
0x77960000 - 0x77984000 C:\WINNT\system32\DNSAPI.DLL
0x74FD0000 - 0x74FDA000 C:\WINNT\system32\WSOCK32.DLL
0x77300000 - 0x77313000 C:\WINNT\system32\iphlpapi.dll
0x774E0000 - 0x774E5000 C:\WINNT\system32\ICMP.DLL
0x772E0000 - 0x772F7000 C:\WINNT\system32\MPRAPI.DLL
0x750E0000 - 0x750EF000 C:\WINNT\system32\SAMLIB.DLL
0x75100000 - 0x7514F000 C:\WINNT\system32\NETAPI32.DLL
0x797B0000 - 0x797BF000 C:\WINNT\system32\SECUR32.DLL
0x75150000 - 0x75156000 C:\WINNT\system32\NETRAP.DLL
0x77930000 - 0x7795A000 C:\WINNT\system32\WLDAP32.DLL
0x77370000 - 0x7739F000 C:\WINNT\system32\ACTIVEDS.DLL
0x77340000 - 0x77363000 C:\WINNT\system32\ADSLDPC.DLL
0x777F0000 - 0x777FE000 C:\WINNT\system32\RTUTILS.DLL
0x6D990000 - 0x6DA3C000 C:\WINNT\system32\SETUPAPI.DLL
0x794D0000 - 0x79532000 C:\WINNT\system32\USERENV.DLL
0x774A0000 - 0x774D3000 C:\WINNT\system32\RASAPI32.DLL
0x77480000 - 0x77491000 C:\WINNT\system32\RASMAN.DLL
0x774F0000 - 0x77512000 C:\WINNT\system32\TAPI32.DLL
0x77320000 - 0x77339000 C:\WINNT\system32\DHCPCSVC.DLL
0x777A0000 - 0x777A8000 C:\WINNT\System32\winrnr.dll
0x777B0000 - 0x777B5000 C:\WINNT\system32\rasadhlp.dll
0x72C50000 - 0x72CD6000 C:\WINNT\system32\CLBCATQ.DLL
0x70440000 - 0x704CF000 C:\WINNT\System32\mlang.dll
0x777E0000 - 0x777E7000 C:\WINNT\system32\VERSION.dll
0x75950000 - 0x75956000 C:\WINNT\system32\LZ32.DLL
0x6AB70000 - 0x6AB75000 C:\WINNT\system32\msimg32.dll
0x19EF0000 - 0x19FFF000 C:\Program Files\Java\j2re1.4.2_03\bin\awt.dll
0x777C0000 - 0x777DE000 C:\WINNT\system32\WINSPOOL.DRV
0x79A90000 - 0x79AA1000 C:\WINNT\system32\MPR.DLL
0x43000000 - 0x43005000 C:\Program Files\Google\Google Desktop
Search\GoogleDesktopNetwork1.dll
0x74F50000 - 0x74F6E000 C:\WINNT\system32\msafd.dll
0x74F90000 - 0x74F97000 C:\WINNT\System32\wshtcpip.dll
0x77900000 - 0x77923000 C:\WINNT\system32\imagehlp.dll
0x72960000 - 0x7298D000 C:\WINNT\system32\DBGHELP.dll
0x687E0000 - 0x687EB000 C:\WINNT\system32\PSAPI.DLL

Heap at VM Abort:
Heap
def new generation total 2240K, used 1391K [0x10010000, 0x10270000,
0x104f0000)
eden space 2048K, 67% used [0x10010000, 0x10167ff0, 0x10210000)
from space 192K, 8% used [0x10210000, 0x10213e68, 0x10240000)
to space 192K, 0% used [0x10240000, 0x10240000, 0x10270000)
tenured generation total 27888K, used 18047K [0x104f0000, 0x1202c000,
0x14010000)
the space 27888K, 64% used [0x104f0000, 0x1168fdd8, 0x1168fe00,
0x1202c000)
compacting perm gen total 29184K, used 29111K [0x14010000, 0x15c90000,
0x18010000)
the space 29184K, 99% used [0x14010000, 0x15c7df50, 0x15c7e000,
0x15c90000)

Local Time = Mon Dec 27 15:54:31 2004
Elapsed Time = 397
#
# The exception above was detected in native code outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_03-b02 mixed mode)
#

BTW:The document of activex supported by swt is too few,I can't find the
right way to program.Are there any document about it?
Re: Strike through Font?? is this possible in SWT [message #448945 is a reply to message #448307] Sat, 15 January 2005 14:04 Go to previous messageGo to next message
Liam Morley is currently offline Liam Morley
Messages: 47
Registered: July 2009
Member
Don't forget to dispose of the first font if you're creating a new one.



FireFly wrote:
> nevermind I figured it out...
> for others that might need this if you are on windows you can
> do something like so...
>
> FontData fontData = label.getFont().getFontData()[0];
> fontData.data.lfStrikeOut = 1;
> Font font = new Font( parent.getDisplay(), fontData );
>
> On Wed, 05 Jan 2005 17:48:28 -0800, FireFly <wiz@vball.net> wrote:
>
>
>>Any pointers or tutorials on how to go about getting strike through in
>>Windows then.
>>
>>On Wed, 5 Jan 2005 09:56:55 -0500, "Steve Northover"
>><steve_northover@ca.ibm.com> wrote:
>>
>>
>>>Strike through fonts are only available on Windows. You will need platform
>>>specific code to create them.
>>>
>>>"FireFly" <wiz@vball.net> wrote in message
>>>news:nkvlt0l93159a57vlq0lv3fnmrksbjce0v@4ax.com...
>>>
>>>>Hi,
>>>>
>>>>I notice that the current styles are only BOLD, NORMAL and ITALIC for
>>>>Font
>>>>
>>>>is there any custom Font classes that also allow strike through to be
>>>>used for common widgets like label or table item. Please help because
>>>>I'm trying to figure out a way to do this.
>>>>
>>>>thank you
>>>>
>>>
>


--
Liam Morley
Computer Science Undergraduate
Worcester Polytechnic Institute
Re: Strike through Font?? is this possible in SWT [message #988368 is a reply to message #448307] Thu, 29 November 2012 11:00 Go to previous messageGo to next message
Stacey Hopkins is currently offline Stacey Hopkins
Messages: 34
Registered: March 2012
Member
did you have any issues with access restriction warnings with this implementation? I presume this would be down to implementing windows specific codes?
Re: Strike through Font?? is this possible in SWT [message #988369 is a reply to message #448307] Thu, 29 November 2012 11:01 Go to previous message
Stacey Hopkins is currently offline Stacey Hopkins
Messages: 34
Registered: March 2012
Member
did you have any issues with access restriction warnings with this implementation? I presume this would be down to implementing windows specific codes?
Previous Topic:Periodic job with UI interaction on eclipse plugin
Next Topic:Unexpected return value from MessageBox.open()
Goto Forum:
  


Current Time: Fri Aug 29 10:13:31 EDT 2014

Powered by FUDForum. Page generated in 0.02081 seconds