How to set dash line color(two colors)?
hello all:
Does anyone know how to set dash line color in java?
I only know how to set line color with a single color.
g2.setColor(Color.black);
g2.setStroke(dashed);
g2.draw(new Rectangle2D.Double(50, 50, 200,100));
what I need to implement is two colors interleave on the dash line.
so that dash line looks like this:
==== ====
red white red white
thank you for any comments.
-Daniel.
create 2 strokes, space them appropriately, draw the rectangle twice.
Similar Messages
-
How to set a HTML color to a control button
How to set a fixed color to a disabled button?
I have a boolean button which has 3 status: on, off and disabled. I don't like the 'grayed and disabled' option. I will use red for off, green for on, and white gray (foreground color) for the disabled status. The HTML color code is BDBDBD. I tried to send the hex number 'BDBDBD' to the button property node 'color[4]' but was told that I was wiring to the wrong type of terminal.
Could any one post a sample code of how to construct the structure of 'color[4]' using a RRGGBB number?
Thanks,
RyanWhat exectly do you want and do you see.
If I run the code you have in LabVIEW 9.0, I get the following result after running.
For convenience I have shown the second color array you set as color indicators:
Note that you use grey as the colors for True and False
Here I have set made the colors more distinct:
Ton
Message Edited by TCPlomp on 07-10-2009 08:00 AM
Message Edited by TCPlomp on 07-10-2009 08:01 AM
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be!
Attachments:
ButtonColor_FP.png 17 KB
ButtonColorMoreColor_FP.png 18 KB -
How 2 set the background color in j2me
Can any body tell me how to set the background color to midlet.??
if you are using Screen then you can call its setBackColor()
or if you are using Canvas then you can call
g.setColor(r,g,b);
g.fillRect(0,0,getWidth,getHieght);
where g is the Graphics instance of Canvas,for further information consult documentation -
How to set a line of table as read only during runtime?
How to set a line (or a cell) of table as read only during runtime?
hi wei
when you create a table keep the readonly property of table as false
you create the columns of table as inputfield.you bind the readonly property of
the inputfield to two context variables
say one for all the columnfields you to want always have as readonly and let this contextattribute of type boolean and let this be attr1
and another for all the columnfields you donot want to be readonly and let this contextattribute of type boolean and let this be attr2
initially set the context attributes attr1 and attr2 as true so the entire table is readonly.
based on the condition you want to check change the attr2 to be false.
if(your condition)
wdcontext.currentcontextelement.setattr2(false);
hope this helps.
regards
saravana -
How to set border lines in table and also in template in the smartforms ?
How to set border lines in table and also in template in the smartforms ?
As I have to create table with following detals
total row = 3
row1 = 3 column
row2 = 6 column
row3 = 9 column
for 2nd and 3rd row data to be fetched using coding.
so can anybody explain me what should i use
Table or Template ?
and I want the border like excel format.
Can anybody suggest me ?
Thanks
nareshif the data is multiple i.e. line items choose table.
if the data is single i.e. fixed choose template.
Create table
> Draw u r no lines
> choose option select pattern
> select display framed patterns
Choose u r required one.
out lined, or full lined. u can choose option.
same procedure to be followed for template also.
with regards,
Kiran.G -
I want to ask you how I can remove this blue dashed line?
http://i.stack.imgur.com/WQpwt.png
Ref javafx 2 - How to remove dashed line - Stack OverflowHi,
This is my code. How do you want to modify this?
List<String> members = new ArrayList<String>();
FileInputStream fstream = new FileInputStream(cube);
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
while ((strLine = br.readLine())!=null)
if(!(members.contains(strLine)))
members.add(strLine);
in.close();
mail.send(members);
Thanks, -
How to set foreground gradent color to label???
using this i can set background gradentcolor to label. But how to set foreground gradentcolor to label???
JLabel compname = new JLabel("ARDENT TECHNOLOGIES INC")
protected void paintComponent(Graphics g)
{ int width = getWidth();
int height = getHeight();
GradientPaint paint = new GradientPaint(0, 0, Color.blue, width, height, Color.green);
Graphics2D g2d =(Graphics2D)g;
g2d.setPaint(paint);
g2d.fillRect(0, 0, width,height);
super.paintComponent(g); } };
compname.setOpaque( false );Thanks in advance
rajareply #3 looks interesting
http://forum.java.sun.com/thread.jspa?forumID=257&threadID=481290 -
How to set a background color to view
Hi All,
i creared a view with 2 textboxes and a button.These elements are in TransparentContainer.I set the background color to the TransparentContainer.By setting color to the TransparentContainer it is comming at the center and the 4 sides of it is displaying in the normal background color of the browser
i didnt find any color options for the view called RootUIElementContainer.the width and height of the view are setted to the browser means 1024*768.
Just like sap editor which we get by the link https://www.sdn.sap.com i want to get my view .....
I want to set color to this RootUIElementContainer element which effect the whole view...not the containers or groups which i add under this RootUIElementContainer
Regards
Padma Nhi Padma,
For changing the background colour you will have to make the change in the theme.
You can download the theme editor plugin for eclipse from SDN. With this plugin, you can make changes to the default themes , save as a new theme
Or if you are using portal, then goto system administrator, theme editor, select SAP Streamline and change the color in Screen areas -> application, then save the theme with different name.
Best regards,
Sangeeta -
How to set the Background Color of a Text Field in a Tabular Report.
Hello,
I tried to set the Background Color of a Text Field in a Tabular Report.
But I was not able to change this colur.
In the report attributes --> column attributes
I tried already:
1. Column Formating -- >CSS Style (bgcolor: red)
2. Tabular Form Element --> Element Attributes (bgcolor: red)
but nothing worked.
Can anybody help me?
I Use Oracle Apex 2.2.1 on 10gR2
thank you in advance.
Oliverin "Report Attributes" select the column to move to the "Column Attributes" page. In the "Element Attributes" field under the "Tabular Form Element" region enter
style="background-color:red;"
I will also check if there is a way to do this via the template and post here again
edit:
in your template definition, above the template, enter the following:
< STYLE TYPE="text/css" >
.class INPUT {background-color:red;}
< /STYLE >
(remove the spaces after the < and before the >)
change "class" to the class that the template is calling
(I'm using theme 9, the table has: class="t9GCCReportsStyle1" so I would enter t9GCCReportsStyle1)
A side-effect of using this second version is that ALL input types will have a red background color--checkboxes, input boxes, etc.
Message was edited by:
TheJosh -
How can I change line colors in HTML reports?
I have a VI that is creating an HTML report based on a table of results. I change the back ground color of the line based on failed results. However this line color change is not seen in the HTML reports. Can anyone give me a good way of basically transferring the properties of my table to the HTML report? Is it possible? Thanks in advance for any help.
Greg - Thanks for the reply. I figured this out doing some more research. The line that I needed was "<BACKLOG="#PAYOFF">Your Cell Text</ID>. The problem I was having was that line is needed in front of the rest of the font formatting commands. For example here is my original line:
<ID WIDTH="200"><BACKLOG="#PAYOFF"><FONT SIZE=+0 COLOR="#OFF">8.3.12.1</ID>
The bold part in the line above is what I added. With the cell color added like this it actually created another cell and pushed existing ones one cell to the right. It then colored the second cell in the row and left the first one blank. Through looking up more examples I found that I was actually putting the cell color command in the middle of the font formatting command. So I tried putting it at the end and it then did nothing. The only way I could get the cell in the table to change and not change anything else was using the syntax below.
<ID BACKLOG="#PAYOFF"><WIDTH="200"><FONT SIZE=+0 COLOR="#OFF">8.3.12.1</ID>
Troy -
How to Set a line's BackGroundColor in JTextPane?
I want to change a whole line's(not only the characters) background color.(display as we set breakpoint in a debug environment).
i tried
DefaultStyleDocument.setCharacterAttributes(start,end-start,MyAttr, false);
This can not set whole line but the begin to the end of the characters in line.
Help,and ThanksThis isn't exactly what you want, but it may give you some idea on how to approach it.
import java.awt.*;
import java.net.*;
import javax.swing.*;
import javax.swing.text.*;
public class BackgroundLines extends JFrame
public BackgroundLines()
throws Exception
JTextArea textComponent = new JTextArea()
public void paintComponent(Graphics g)
Rectangle drawHere = g.getClipBounds();
int lineHeight = g.getFontMetrics().getHeight();
int startOffset = getInsets().top;
int start = (drawHere.y / lineHeight) * lineHeight + startOffset;
int startLineNumber = (drawHere.y / lineHeight);
int endLineNumber = startLineNumber + (drawHere.height / lineHeight) + 1;
for (int i = startLineNumber; i <= endLineNumber; i++)
g.setColor( i % 2 == 0 ? getBackground() : Color.lightGray );
g.fillRect(drawHere.x, start, drawHere.width, lineHeight);
start += lineHeight;
super.paintComponent(g);
textComponent.setOpaque( false );
JScrollPane scrollPane = new JScrollPane(textComponent);
scrollPane.setPreferredSize(new Dimension(300, 250));
getContentPane().add( scrollPane );
public static void main(String[] args)
throws Exception
BackgroundLines frame = new BackgroundLines();
frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
frame.pack();
frame.setVisible(true);
} -
How to set vertical line in SAPScript
Dear All,
I have to set vertical line at a particular position of SAPScript. Here the lines are of varying length. Can you suggest how to do that?
Line 1...................... | Vertical Line
Line 2......................... | Vertical Line
Line 3............... | Vertical Line
Thanks and regards,
AtanuHii
use this
BOX WIDTH 0 FRAME 10
BOX HEIGHT 0 FRAME 10
BOX WIDTH 5 CM HEIGHT 1 CM FRAME 10 TW INTENSITY 10
BOX WIDTH 7 CM HEIGHT 5 CM FRAME 10 TW INTENSITY 10
HOPE THIS HELPS
Thanks & Regards
Naresh -
How to set up NAT for two servers using same port with ASDM ASA 5505
Hi there,
We have a new installation of a ASA 5505 and are trying to get some NAT issues straightened out. Here is the scenario: On our internal network, we have two servers running Filemaker Server, a relational database server that clients connect with using port 5003. Our goal is to be able to allow users from the outside to access either of these servers as needed. I know how to set up a simple static NAT rule and matching Access rule in ASDM which would be fine for a case in which only one server using a given port is running on a network, but for simple static rules I seem to be blocked from entering a different translated port number from the orginal port number, which becomes a problem when two servers we need to access from the outside are running software using the same port number.
What is the simplest way to address this need? I am guessing that I need to set up a scenario like this, where port 5004 (or any arbitrarily choosen unused port, can be used to access the second server:
Outside user enters FQDN:5004 and this translates to Database server # 1 as 192.168.1.40:5003
and
Outside user enters FQDN:5003 and this translates to Database server # 1 as 192.168.1.38:5003
If so, what is the easist way to get this done? Or is there a better what to handle this scenario?
Thanks in advance,
JamesI would create two objects and use object NAT
object network Obj_5004
host 192.168.1.40
object network Obj_5004
nat (inside,outside) static service tcp 5003 5004
object network Obj_5003
host 192.168.1.38
object network Obj_5003
nat (inside,outside) static service tcp 5003 5003
Of course you will need to open your outside interface for tcp ports 5003 and 5004 to make this happen -
How to set single parameters for two tables?
SELECT GM.GRNNO,GM.GRNDATE,SUM(GS.APPROVED),SM.ISSUENO,SM.ISSUEDATE,GS.ITEMCODE,SUM(SS.ISSUEDQTY)
FROM IMS_GRNM GM,IMS_GRNS GS, IMS_ISSUEM SM, IMS_ISSUES SS
WHERE GM.GRNMSERIAL=GS.GRNSSERIAL
AND SM.ISSUEMSERIAL=SS.ISSUESSERIAL
AND GM.POSTED='T'
AND SM.POSTED='T'
AND GS.ITEMCODE=SS.ITEMCODE
AND GS.ITEMCODE='01-01-02-019'
AND *******
GROUP BY GM.GRNNO,SM.ISSUENO,GM.GRNDATE,SM.ISSUEDATE,
GS.ITEMCODE ORDER BY GM.GRNDATE,SM.ISSUEDATE;
******* here i have to select the data from both the tables between two parameters named :P_1 and :P_2.
the date column in IMS_GRNM is named as GRNDATE.
the date column in IMS_ISSUEM is named as ISSUEDATE.
how to set such parameters???I think all you need is
Where table1.column1 between :p1 and :p2
and table2.column2 between :p1 and :p2 -
How to set divider line in Project Task List?
Hi
Does anyone know how to set the position of the divider line in project task list?
ThanksHi,
As I understand, you would like to customize divider line between task list view and grantt view.
You could press F12 to locate the CSS code of this line, then customize it via CSS style code.
In addition, the line could move by clicking it via Mouse. If you think Gantt view is not clear enough, you could click Zoom in or Zoom out to adjust it.
Regards,
Rebecca Tu
TechNet Community Support
Maybe you are looking for
-
I recently bought an i pod nano first gen and am having a hard time syncing
its not fully charged, so do i have to wait for it to charge to put music on it. i have a mac, and its not even acknowledging its existence thanks!
-
Define assets value date.
Dear experts, i have one problem, when i am posting f-90 of assets acquisition (giving current date) geeting one error meesage that is. "check assets value date" but i do not understand where i have to define this assets value date what is relation w
-
Maxl statement (display user in group all;) is not working.
Hello, Hyperion version 9.3.1 upgraded to 9.3.3. Not sure the below issue is because of this I have an interesting issue with a maxl statement : "display user in group all;". When I execute this statement through command prompt doing essmsh, it does
-
HotSync screen flickers on my 755p when i Try to Hotsync
I have had my Palm Treo 755p for a year and 6 months. During this time I have been able to HotSync with no problem up until recently. The last time I had a successful hotsync was back on Jan. 1, 2009 and I dont know what went wrong from there. I hook
-
When unzipping a file I'm getting an Error 1 message - "Operation Not Permitted."
What do I need to do to correct this?