How to move cursor left to right in jtextpane
I am developing a Urdu text editior in which i am faceing problem mentioned above so grateful for you reply
Kuun Sajjad
for you
" Kash koi to batay"
If you give more details you may get more replies
:-)
Similar Messages
-
How can I separate Left and right audio channels in labview 8.5 tia sal22
How can I separate Left and right audio channels in labview
8.5 tia sal22
Greetings All
I have a working Labview vi that converts a math formula to an
audio signal. I would like to have the
right and left audio channels playing different math audio signals is this
possible?
Example
Right channel -> plays the audio signal created by a math
formula
Left channel -> plays the audio signal created by another
math formula with adjustable phase control
I’ve included a VI with a working audio and math formula but
I’m not sure how to separate the left and right channels.
I’m using labview 8.5
I looked up a similar question on the
support board and it said” use an instance of the the Sound Output Write that
has a 1D waveform data type input (i.e. Sound Output Write (DBL)). Each
element in the array would correspond to a channel.”
But I’m not exactly sure what he meant. I’m using a formula to generate the wave file
Tia sal22
Attachments:
fixed mathscript formula to sound test.vi 680 KBSorry it took so long to get back. Here's the new VI with it splitting out the left and right channels.
I'm using a Gigaport HD 8 output usb audio device but I'm experience clicks and pops. I increase the buffers
but I still get the clicks and pops. I know gigaport HD can use ASIO drivers which most likely would solve the problem but one needs to code in C for this which I'm not proficient in. Can someone recommend a work around to prevent this clicks and pops, can I somehow change my VI to fix this? Does anyone have a VI that will allow access to the ASIO latency properties?
I'm using labview 8.5
And a gigaport HD which is a USB audio device which outputs 8 analog signals (it is ASIO compatible)
tia sal22
Attachments:
lvt_audio_realtime-out left right device ID test.vi 68 KB -
How can I keep left- and right-aligned paragraphs together on the same line?
I am currently trying to typeset a menu. Basically, I want the Dish Title to be left-aligned and the Price right-aligned — but on the same line. I can achieve the effect by typing in a shift+tab after the Dish Title text and then inserting the price, but I would rather have two distinct paragraphs styles, so that I can adjust them globally to see what looks good. I can achieve the effect by adjusting the Price character baseline of the price and moving it up, but then if I need to make any price changes, I find it a pain trying to get the cursor in the right place in situations where a baseline is substantially altered.
Back in the old days (in Ventura!!), I could just remove the line break after the "Dish Title" style and the "Price" would move up to the same line, but I can't seem to be able to do this in CS6.
Any ideas?Please show some examples. It's easier to help you.
If I understand right, use a paragraph style with a right aligned tab and nested styles and grep styles. That's extremly flexible.
Have fun -
Make my movie clip move from left to right with arrow buttons.
Hi hope this is a quick one..
I have all the elements set up already so just need the
logistics of how i can acheive the following:
I have an arrow at the furthest left and furthest right of my
main flash movie. I then have a movie clip in the middle which has
indidivual images on a kind of long strip. When i click the left
arrow i want the movie to begin to move from the right to the left
and visa versa. I have achieved this with the keyboard left and
right keys so what i really need is to convert this theory for the
left and right arrow buttons?
var speed:Number = 4;
object_mc.onEnterFrame = function() {
if (Key.isDown(Key.RIGHT)) {
this._x = this._x+speed;
} else if (Key.isDown(Key.LEFT)) {
this._x = this._x-speed;
Any help will be greatly appreciated??
Thanks
Benuse the getAscii() or getCode() methods of the key class. and
you can always use the trace function to check the values to be
used in your if-statement. -
OCI: how to move cursor?
I'm writing a program with OCI (for Oracle server -linux) and gonna handle
as much data as number of millions.
The problem is that I have to show a page which can hold only 10~50 records
at once and if 30 records from 100000th row through 100030th row is to be shown,
I think I have to move cursor to the starting position(100000th row in this
case), right?
Is there anyone who can tell me how to make this work with oci library function?
All I can do at the moment is passing all those previous 99999 records by and
select next 30 records. You know, this takes very very long time and makes no
sense to end users.
Any suggestions or idea would be greatly appreciated.
nullOCI doesn't have any screen handling functions nor is it the purpose of OCI. If you want screen handling functions, you can use curses or GTK+ or, if you really want to shoot yourself in a foot, MFC.
-
How to move cursor from one textfield to another textfield byusing enterkey
hii all,
I have a problem in java script.
To move cursor from one textbox to another text box ,I have take the length of the textboxes of the first column.I used onkeyDown event .
in the function ,firest i checked the condition like
for(i=0;i<form1.box.length;i++) //box is the name of the textboxes
if(event.keyCode==13)
form1.box[i+1].focus();
return false;
by using this the cursor is moving from first text box to secon textbox and stops.
if i use event.returnValue=false; instead of return false ,then the cursor automatically going to the laxt textbox of the column.
my problem is how i can focus the cursor from one textbox to another textbox one after the other till the end.
if any one has solution please help me.
also if we can do in another way also,please help me.
thanx.>try the following code :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<SCRIPT language="Javascript">
function fnTest(str) {
if(event.keyCode==13) {
if(str == 4) {
formHeader.box[0].focus();
else {
formHeader.box[parseInt(str)+1].focus();
return false;
</SCRIPT>
<BODY>
<FORM name="formHeader">
<CENTER>
<INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('0');">
<br>
<INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('1');">
<br>
<INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('2');">
<br>
<INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('3');">
<br>
<INPUT TYPE="TEXT" name="box" value="" onKeyDown="javascript:fnTest('4');">
</CENTER>
</FORM>
</BODY>
</HTML>
---------------------------------------------- -
How to move cursor to a particular field in a form when the form opens
Hi All,
Using Forms Personalization how to move the cursor to a particular field in a form when the form opens.We are using Oracle Applications 11.5.10.2
Please let me know as soon as possible.
Thanks,
--John.Hi Satya,
Try the following
Open the forms personalization window
Seq: 10
description : Move cursor
Level : Function
On Condition Tab-
Trigger Event : when-new-item-instance
Trigger Object:- (The field on which the cursor is appearing now when you open the form ) for eg : If I am working on a vendor Master form in that case it would be -VNDR.VENDOR_NAME_MIR.
Processing Mode : Both
Context:
whatever context you want to do it respoansibility level or user level.
On the Actions Tab
Seq: 1
Type: Bulletin
Bulletin type : GO_ITEM
Argument : The field to which you want to navigate to. (In my case I want to navigate to Alternate name on the Vendor master form so it would be VNDR.VENDOR_NAME_ALT_MIR).
see if it works for you.
cheers,
Ankur -
How can I write left and right in the same line of a richtextbox?
I want to write, in the same line, text with a right aligment and other with left aligment. How can I do it?
thanksI want to write, in the same line, text with a right aligment and other with left aligment. How can I do it?
thanks
As
Viorel_ says "Perhaps there are other much easier solutions. For example, create two
RichTextBoxes with no borders (if you only need two columns of text)" but the real issue would be saving the info in the RichTextBox's (RTB's) RTF or Text to two different RTF or TextFiles. Although I suppose if it was just going to
a TextFile then you could somehow use a delimited text file so each same line number of each RTB is appended to the same line and delimited. That way you could probably load a split array with each line from the text file splitting on the delimeter per line
and providing RTB1 with index 0 of the split array and RTB2 with index 1 of the split array. I'm not going to try that.
This is some leftover code from a long time ago. It has three RTB's. RTB1 is there I suppose because the thread asking for this code wanted it. RTB2 is borderless as well as RTB3. The Aqua control in the top image below is the Panel used to cover RTB2's
scrollbar. So RTB3's scrollbar is used to scroll both controls.
I forgot to test if I typed past the scroll position in RTB2 if both would scroll as maybe RTB3 would not since it would not have anything to scroll to I suppose.
Maybe this code can help or maybe not. The bottom two images are the app running and displaying nothing scrolled in RTB2 and RTB3 then the scroll used in the bottom image.
Disregard the commented out code in the code below. It was there so I left it there. I suppose you should delete it. Also I didn't set the RTB's so one was left aligned and the other right aligned. I believe the Panel becomes a control in RTB2's controls
when it is moved to cover RTB2's vertical scrollbar but don't remember although that seems the case since both RTB2 and RTB3 are brought to front so if the Panel was not one of RTB2's controls I would think it would be behind RTB2 and RTB2's vertical scrollbar
would display but don't remember now. In fact I don't really remember how that part works. :)
Option Strict On
Public Class Form1
Declare Function SendMessage Lib "user32.dll" Alias "SendMessageW" (ByVal hWnd As IntPtr, ByVal msg As Integer, ByVal wParam As Integer, ByRef lParam As Point) As Integer
Const WM_USER As Integer = &H400
Const EM_GETSCROLLPOS As Integer = WM_USER + 221
Const EM_SETSCROLLPOS As Integer = WM_USER + 222
Dim FixTheProblem As New List(Of String)
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.CenterToScreen()
Panel1.BackColor = Color.White
Panel1.BorderStyle = BorderStyle.Fixed3D
RichTextBox2.BorderStyle = BorderStyle.None
RichTextBox2.ScrollBars = RichTextBoxScrollBars.Vertical
RichTextBox3.BorderStyle = BorderStyle.None
RichTextBox3.ScrollBars = RichTextBoxScrollBars.Vertical
RichTextBox3.Size = RichTextBox2.Size
RichTextBox3.Top = RichTextBox2.Top
RichTextBox3.Left = RichTextBox2.Right - 20
Panel1.Size = New Size(RichTextBox2.Width * 2 - 16, RichTextBox2.Height + 4)
Panel1.Left = RichTextBox2.Left - 2
Panel1.Top = RichTextBox2.Top - 2
RichTextBox2.BringToFront()
RichTextBox3.BringToFront()
FixTheProblem.Add("Curry: £6.50")
FixTheProblem.Add("Mineral Water: £4.50")
FixTheProblem.Add("Crisp Packet: £3.60")
FixTheProblem.Add("Sweat Tea: £2.23")
FixTheProblem.Add("Motor Oil: £12.50")
FixTheProblem.Add("Coca Cola: £.75")
FixTheProblem.Add("Petrol Liter: £3.75")
FixTheProblem.Add("Shaved Ice: £.50")
FixTheProblem.Add("Marlboro: £2.20")
FixTheProblem.Add("Newspaper: £.25")
FixTheProblem.Add("Spice Pack: £.75")
FixTheProblem.Add("Salt: £.50")
FixTheProblem.Add("Pepper: £.30")
For Each Item In FixTheProblem
RichTextBox1.AppendText(Item & vbCrLf)
Next
RichTextBox1.SelectionStart = 0
RichTextBox1.ScrollToCaret()
Dim Fix As String = ""
For Each Item In FixTheProblem
Fix += Item.Replace(":", "^:") & vbCrLf
Next
Fix = Fix.Replace(vbCrLf, "^>")
Dim FixSplit() As String = Fix.Split("^"c)
For i = 0 To FixSplit.Count - 1
If CBool(i Mod 2 = 0) = True Then
RichTextBox2.AppendText(FixSplit(i).Replace(">"c, "") & vbCrLf)
ElseIf CBool(i Mod 2 = 0) = False Then
RichTextBox3.AppendText(FixSplit(i) & vbCrLf)
End If
Next
End Sub
Dim RTB2ScrollPoint As Point
Private Sub RichTextBox2_Vscroll(sender As Object, e As EventArgs) Handles RichTextBox2.VScroll
Dim RTB2ScrollPoint As Point
SendMessage(RichTextBox2.Handle, EM_GETSCROLLPOS, 0, RTB2ScrollPoint)
SendMessage(RichTextBox3.Handle, EM_SETSCROLLPOS, 0, New Point(RTB2ScrollPoint.X, RTB2ScrollPoint.Y))
'Me.Text = RTB2ScrollPoint.X.ToString & " .. " & RTB2ScrollPoint.Y.ToString
End Sub
Private Sub RichTextBox3_Vscroll(sender As Object, e As EventArgs) Handles RichTextBox3.VScroll
Dim RTB3ScrollPoint As Point
SendMessage(RichTextBox3.Handle, EM_GETSCROLLPOS, 0, RTB3ScrollPoint)
SendMessage(RichTextBox2.Handle, EM_SETSCROLLPOS, 0, New Point(RTB3ScrollPoint.X, RTB3ScrollPoint.Y))
'SendMessage(RichTextBox2.Handle, EM_SETSCROLLPOS, 0, New Point(0, 10))
End Sub
End Class
La vida loca -
Q#1:
I want to learn, how, with Photoshop and Illustrator to create a left to
right two-word-curved-headline gradient within the letters without having
to do each letter individually ???
Q#2:https://www.google.com/search?sourceid=chrome-psyapi2&rlz=1C1CHFX_enUS546US546&ion=1&espv= &ie=UTF-8&q=Onlint%20Photoshop…
-
How to put the left to right scroll bar
Hi iam new comer to sap, So pls help me. I want to display more than 17 fields from 6 different tables. At the time of display i want to put left to right scroll bar in my report screen. Because in my report screen the records are displayed with merged. So please give your valuable ideas.
Thanks in advance
regards,
Kesav.Hi
in classical report or intercative report it won't be possible
do in ALV report that can be possible
you can define any number of fieldcatalogs means any number of fields in the output
use in this way
Your own company logo can go here if it has been saved (OAOR)
If the logo is larger than the size of the headings in gt_page,
the window will not show full logo and will have a scroll bar. Thus,
it is a good idea to have a standard ALV header if you are going to
use logos in your top of page.
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gt_page
i_logo = 'ENJOYSAP_LOGO'.
ENDFORM. "top_of_page
i wil send u my program by seaing that you can find it
*& Report ZTEST_ALV_LOGO
REPORT ztest_alv_logo.
TYPE-POOLS : slis.
*ALV Formatting tables /structures
DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.
DATA: gt_events TYPE slis_t_event.
DATA: gs_layout TYPE slis_layout_alv.
DATA: gt_page TYPE slis_t_listheader.
DATA: gs_page TYPE slis_listheader.
DATA: v_repid LIKE sy-repid.
*ALV Formatting work area
DATA: w_fieldcat TYPE slis_fieldcat_alv.
DATA: w_events TYPE slis_alv_event.
DATA: gt_bsid TYPE TABLE OF bsid WITH HEADER LINE.
INITIALIZATION.
PERFORM build_events.
PERFORM build_page_header.
START-OF-SELECTION.
*perform build_comment. "top_of_page - in initialization at present
SELECT * FROM bsid INTO TABLE gt_bsid UP TO 10 ROWS.
*perform populate_for_fm using '1' '3' 'BUKRS' '8' 'GT_BSID' 'Whee'.
*USING = Row, Column, Field name, display length, table name, heading
*OR
PERFORM build_fieldcat.
gs_layout-zebra = 'X'.
*top of page event does not work without I_callback_program
v_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_structure_name = 'BSID'
i_background_id = 'ALV_BACKGROUND'
i_grid_title = 'This is the grid title'
I_GRID_SETTINGS =
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
it_events = gt_events[]
TABLES
t_outtab = gt_bsid.
Form..............: populate_for_fm
Description.......: Populates fields for function module used in ALV
FORM populate_for_fm USING p_row
p_col
p_fieldname
p_len
p_table
p_desc.
w_fieldcat-row_pos = p_row. "Row Position
w_fieldcat-col_pos = p_col. "Column Position
w_fieldcat-fieldname = p_fieldname. "Field name
w_fieldcat-outputlen = p_len. "Column Lenth
w_fieldcat-tabname = p_table. "Table name
w_fieldcat-reptext_ddic = p_desc. "Field Description
w_fieldcat-input = '1'.
APPEND w_fieldcat TO gt_fieldcat.
CLEAR w_fieldcat.
ENDFORM. " populate_for_fm
*& Form build_events
FORM build_events.
DATA: ls_event TYPE slis_alv_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = gt_events.
READ TABLE gt_events
WITH KEY name = slis_ev_user_command
INTO ls_event.
IF sy-subrc = 0.
MOVE slis_ev_user_command TO ls_event-form.
APPEND ls_event TO gt_events.
ENDIF.
READ TABLE gt_events
WITH KEY name = slis_ev_top_of_page
INTO ls_event.
IF sy-subrc = 0.
MOVE slis_ev_top_of_page TO ls_event-form.
APPEND ls_event TO gt_events.
ENDIF.
ENDFORM. " build_events
*& Form USER_COMMAND
When user command is called it uses 2 parameters. The itab
passed to the ALV is in whatever order it currently is on screen.
Therefore, you can read table itab index rs_selfield-tabindex to get
all data from the table. You can also check r_ucomm and code
accordingly.
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
READ TABLE gt_bsid INDEX rs_selfield-tabindex.
error checking etc.
SET PARAMETER ID 'KUN' FIELD gt_bsid-kunnr.
CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
ENDFORM. "user_command
*& Form top_of_page
Your own company logo can go here if it has been saved (OAOR)
If the logo is larger than the size of the headings in gt_page,
the window will not show full logo and will have a scroll bar. Thus,
it is a good idea to have a standard ALV header if you are going to
use logos in your top of page.
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = gt_page
i_logo = 'ENJOYSAP_LOGO'.
ENDFORM. "top_of_page
*& Form build_fieldcat
*Many and varied fields are available here. Have a look at documentation
*for FM REUSE_ALV_LIST_DISPLAY and REUSE_ALV_FIELDCATALOG_MERGE
FORM build_fieldcat.
w_fieldcat-fieldname = 'BUDAT'.
w_fieldcat-seltext_m = 'Dte pst'.
w_fieldcat-ddictxt(1) = 'M'.
Can change the position of fields if you do not want them in order
of the DDIC or itab
w_fieldcat-row_pos = '1'.
w_fieldcat-col_pos = '10'.
APPEND w_fieldcat TO gt_fieldcat.
CLEAR w_fieldcat.
ENDFORM. " build_fieldcat
*& Form build_page_header
gt_page is used in top of page (ALV subroutine - NOT event)
*H = Header, S = Selection, A = Action
FORM build_page_header.
For Headers, Key is not printed and is irrelevant. Will not cause
a syntax error, but is not used.
gs_page-typ = 'H'.
gs_page-info = 'Header 1'.
APPEND gs_page TO gt_page.
gs_page-typ = 'H'.
gs_page-info = 'Header 2'.
APPEND gs_page TO gt_page.
For Selections, the Key is printed (bold). It can be anything up to 20
bytes. It gets printed in order of code here, not by key value.
gs_page-typ = 'S'.
gs_page-key = 'And the winner is:'.
gs_page-info = 'Selection 1'.
APPEND gs_page TO gt_page.
gs_page-typ = 'S'.
gs_page-key = 'Runner up:'.
gs_page-info = 'Selection 2'.
APPEND gs_page TO gt_page.
For Action, Key is also irrelevant.
gs_page-typ = 'A'.
gs_page-info = 'Action goes here'.
APPEND gs_page TO gt_page.
ENDFORM. " build_page_header
REWARD IF USEFULL -
How to adjust the left and right Margin in PDF
Hi,
I've a dashboard ,when i open this dashboard in PDf , left and right margin are not in sink. How to adjust those margins.
Thanks,
MalliHi,
there are only two joins available for InfoSet in BI.
For more details about Infoset joins you may refer following SAP documentation or serch at forums.
http://help.sap.com/saphelp_nw04/helpdata/en/ed/084e3ce0f9fe3fe10000000a114084/frameset.htm
I hope it will help.
Thanks,
S -
How do i isolate Left and right sound on X-Fi ca
Hey all,
Wonder if anyone knows how to turn off left channel sound and vice versa. I play alot of Karaoke VCDs and they usually have left channel as music and right channel as music with vocal but i can't find the option to turn off either left or right.
I usually do this by using the L/R slider in wondows mixer but when i do this with the X-Fi card the left channel (music only) seems to be a mix of L&R resulting in hearing the vocal. Strangly this doesn't happen when playing in Power DVD the slider method works fine, but with apps like real player, media player, media source etc. the problem presists.
Any Ideas? Appriciate any help ^.^
(Running X-Fi Platinum with Logitech Z5500 5.)Jason,
I've tried turning off cmss but it still doesn't do the job. I find it strange that there is no problem with Power DVD but with other applications. Does this mean it might be a application problem?
Mmm...running out of ideas.... -
How can I combine Left and Right audio?
Hi,
When I record video, one lapel mic records to the left channel and the other records to the right channel in one audio track. I can't seem to figure out how to combine them within Premiere Pro (I've already attempted searching the forums for more info). I know in Sony Vegas you can right click the single audio track and select "Combine" and it will combine the 2 channels so that when people watch the end product you have both voices coming out of both speakers.
Any help would be appreciated.
Thanks
Kelly G.Hello,
Yes i have the same issue.
I use the duplicate Audio track and fill left and right all the time.
when i am doing Interview videos i usually have one person on channel 1 and the other on channel 2 and it comes out as L and R in Premiere.
Today i was shooting with myself on Channel 2 and a shotgun for some ambient sound on channel 1.
In Vegas or FCP 7 there is a simple effect to drag and drop called " Combine" that nicely combines the L and R channels each into stereo.
I used to use it quite a bit and think it would be a great addition to Premiere Pro.
So i am wondering several years since this was first post if Premiere does in fact now have this option...and where it might be that i over looked it?
If not.....is there an easier way to do this than the fill left and right method?
Thanks so Much!
Mark -
Tooltip is shown right outside the desktop - How to move it left to mouse?
Hello,
in my application I create tooltips for a JTable using the celltext when pressing the mouse.
public void jDisturbanceMgmntTable_mousePressed(MouseEvent e)
if (e.getButton() == MouseEvent.BUTTON1)
tooltip.setTipText(ToolTipText);
int x = jDisturbanceMgmntTable.getLocationOnScreen().x + e.getX();
int y =jDisturbanceMgmntTable.getLocationOnScreen().y + e.getY() +20;
PopupFactory popupFactory = PopupFactory.getSharedInstance();
tooltipPopup = popupFactory.getPopup(jDisturbanceMgmntTable, tooltip,x,y);
tooltip.setFont(new java.awt.Font("Courier New", Font.PLAIN, 18));
tooltipPopup.show();
The tooltip is always shown right from the mouse- pointer. If the mainwindow is maximized and I click near the right screen edge, the tooltip is show outside the desktop window.
Normally the tooltip should be moved left the mousepointer :
if(x + "TooltipWindow.getWidth()" > Toolkit.getDefaultToolkit().getScreenSize().x)
x = x - "TooltipWindow.getWidth()"
But that is exactly my problem, I don't know how to get the width of the tooltip window.
Any suggestions?
Message was edited by:
pelle23@Cesar_Castro
This is a really good idea.
To close the post I want to give the complete working code :
public void jDisturbanceMgmntTable_mousePressed(MouseEvent e)
/* when the left mouse- button is pressed on the JTable*/
if (e.getButton() == MouseEvent.BUTTON1)
/* get the text of the cell the mouse is pointing */
int iRow = jDisturbanceMgmntTable.getSelectedRow();
if (iRow > -1)
Object CellObj = jDisturbanceMgmntTable.getValueAt(jDisturbanceMgmntTable.getSelectedRow(),
jDisturbanceMgmntTable.getSelectedColumn());
String ToolTipText = null;
/*put the cell- text into the ToolTipText string- object*/
if (CellObj != null)
ToolTipText = CellObj.toString();
else
ToolTipText = "...";
/*searching for a linebreak in the text (find out if it is a multi- line text)*/
int first_row=ToolTipText.indexOf("\n");
if(first_row == -1)
first_row=ToolTipText.length();
/* Copy all the letters from the first line to a new object
The idear is that the width of the tooltip in dependend only
on the first line*/
String strFirstRow=ToolTipText.substring(0,first_row);
/*Replacing the formatting- signs to html- code*/
ToolTipText = ToolTipText.replace("\n", "<br>");
ToolTipText = ToolTipText.replace("\t", " ");
ToolTipText = ToolTipText.replace(" ", "?");
ToolTipText = "<html>" + ToolTipText + "</html>";
tooltip.setTipText(ToolTipText);
/* getting the default Tooltip position*/
int x = jDisturbanceMgmntTable.getLocationOnScreen().x + e.getX();
int y =jDisturbanceMgmntTable.getLocationOnScreen().y + e.getY() +20;
//creating the font object for the tooltip
Font font=new Font("Courier New", Font.PLAIN, 18);
//getting the fontmetrics for that font
FontMetrics fontmetrics = tooltip.getFontMetrics(font);
//getting the width in pixel for the first line of text - should be nearly the width of the tooltip
int width_of_text=fontmetrics.stringWidth(strFirstRow);
//getting the width of the desktop
int ScreenWidth = Toolkit.getDefaultToolkit().getScreenSize().width();
//calculating the approx x endposition of the tooltip window
//is the position of the mouse- pointer plus the length of the first line of text adjusting by 10 pixel offset
int toolTipXEndPos = width_of_text+x+10;
// if that position is outside the desktop
if(toolTipXEndPos > ScreenWidth)
//move the window left
x = ScreenWidth - width_of_text -20;
PopupFactory popupFactory = PopupFactory.getSharedInstance();
tooltipPopup = popupFactory.getPopup(jDisturbanceMgmntTable, tooltip,x,y);
tooltip.setFont(font);
tooltipPopup.show();
} -
Status bar moves from left to right, while using "find"?
I use the "Find" (ctrl + F) feature quite a bit, and when the "Find" tab is viewable at the bottom, the status bar information moves from the left side of the screen to the right side. This is very off-putting to me and I was wondering if there was any way that this could be fixed so that it always appears in the same spot.
Since it involves the status bar see item #10 "Status-4-Evar" extension as a solution in
You can make Firefox 4.0.1 and '''Firefox 5.0''' look like Firefox 3.6.17, see numbered items 1-10 in the following topic [http://dmcritchie.mvps.org/firefox/firefox-problems.htm#fx4interface Fix Firefox 4.0 toolbar user interface, problems (Make Firefox 4.0 look like 3.6)]
Maybe you are looking for
-
How to Clear "recent" listing in new Acrobat X Pro
In new Acrobat X Pro, when I open this program a window appears listing "recent" files that I have previously opened. I cannot clear this "recent" listing. I have deleted some of those files, and do not want them to appear in this window anymore. I c
-
Links in Apple Mail not opening in Firefox 15
Links in messages in Apple Mail have recently stopped opening Firefox tabs and windows. The Mail window fades, as if a new window or application were being accessed, but nothing happens. I have reset my default browser (according to Mozilla instructi
-
Hi, I´m on a Mac, OS 10.9.3. I need an add-on for Photoshop. Since I can´t just download it to CS5, I got the xml-file (NCS Selector for Adobe.xml) but my help says I cannot use it in CS5! Any other solution??? Marie
-
Error detecting promise sata controller on kt4 ultra
Hello, I've searched the forum and "the rest" of the internet without finding a solution to my problem. The problem is: Normally when you boot the kt4-ultra you will have a message saying "FastTrack 376(tm) Bios version 1.00.0.18(c)2002-2005 Promise
-
Connection to Oracle 9.0.1
Hi there, I get following error message while connecting by my app to my dbase : package oracle.jdbc does not exist. My environment variables are updated with the common variables like [Oracle home]\jdbc\lib\classes111.zip and [ORACLE_HOME]\jdbc\lib\