Tree on lines in Lynn Township, PA
During a storm last week, a tree fell on some telephone lines on Golden Key Rd (Route 863) in Lynn Township (Kempton), PA. About 1/2 mile north of Kistler Valley Rd. Near pole # B-16-13
I called Verizon to report this issue last Friday and it has not yet been fixed.
The wire is literally holding the tree up on the lines and I am afraid it will break and cut off my landline.
Please send someone out to fix it.
Thanks.
Hi pjsutton,
Your issue has been escalated to a Verizon agent. Before the agent can begin assisting you, they will need to collect further information from you. Please go to your profile page for the forum and look at the top of the middle column where you will find an area titled "My Support Cases". You can reach your profile page by clicking on your name beside your post, or at the top left of this page underneath the title of the board.
Under "My Support Cases" you will find a link to the private board where you and the agent may exchange information. This should be checked on a frequent basis, as the agent may be waiting for information from you before they can proceed with any actions. To ensure you know when they have responded to you, at the top of your support case there is a drop down menu for support case options. Open that and choose "subscribe". Please keep all correspondence regarding your issue in the private support portal.
Similar Messages
-
JTree: how not to render the "tree connecting lines"
I have a JTree.
I would like that my custom tree renderer (using windows LAF) did not paint the dotted line that connect the hierarchy nodes. setting the icon to null in the default renderer only do not paint the folder. How can I disable also the painting of the dotted line?
using
tree.putClientProperty("JTree.lineStyle", "None")
I disable it for the whole tree.
First of all this do not work on Windows LAF. Then I'd like to disable only on certain branches or nodes, that are somehow as "empty containers", while keeping hte default feature for the "good branches".
any idea?
thanks
Edited by: Davide_Gesino on Nov 8, 2009 5:24 AMhii,
one from possible:
tree.putClientProperty("JTree.lineStyle", "Horizontal"); a lots examples (runnable) at http://www.java2s.com/Code/Java/Swing-JFC/Tree.htm
... kopik -
Good morning!
We just moved into our home and have several trees on the front edge of our property that are entangled in telephone and cable lines. We've checked with the local power company and they've assured us that the wires are not theirs and we should contact our phone and cable company. We are curious to know if you do tree trimming or tree removal since the lines are completely surrounding the wires.
Thanks so much!!
As an aside, we LOVE our FiOs service! We came from Sussex county where we had good cable and internet but this is SO MUCH BETTER!
Thanks!!
Alison StellaVerizon support is in receipt of this issue. We will send you a PM to gather additional information.
Thanks,
Tonya D.
Notice: Content posted by Verizon employees is meant to be informational and does not supersede or change the Verizon Forums User Guidelines or Terms or Service, or your Customer Agreement Terms and Conditions or Plan. -
Re: Tree Lines on an Outline Field
Actually, you can use the outline field in Forte R2 to mimic what you're
trying to do. True tree and list-view widgets are fully supported (quite
nicely, btw) in R3.
Basically, set up your subclass of displayNode to have an image data
attribute that is displayed on the widget. Then, create a few stock
tree-like bitmaps (like a vertical line, a vertical line with a horizontal
line, etc.). As the user expands and contracts the nodes in the outline
view, dynamically change the bimtap accordingly.
Hope this helps...
-Katie
Does anyone know if Forte can put the tree/branch lines on the hierarchical
structure of an outline field? I can get the outline/hierarchical structure
to display and work fine, but without the lines showing how nodes relate,
its hard to read.
Thanks.Wait for Release 3.Does anyone know if Forte can put the tree/branch lines on the hierarchical
structure of an outline field? I can get the outline/hierarchical structure
to display and work fine, but without the lines showing how nodes relate,
its hard to read.
Thanks.Wait for Release 3.
Fred Scholldorf
Email: [email protected]
=== -
Tree Lines on an Outline Field
Does anyone know if Forte can put the tree/branch lines on the hierarchical
structure of an outline field? I can get the outline/hierarchical structure
to display and work fine, but without the lines showing how nodes relate,
its hard to read.
Thanks.Does anyone know if Forte can put the tree/branch lines on the hierarchical
structure of an outline field? I can get the outline/hierarchical structure
to display and work fine, but without the lines showing how nodes relate,
its hard to read.
Thanks.Wait for Release 3.
Fred Scholldorf
Email: [email protected]
=== -
How to manage graphic lines in two different panes
Hi All,
I am working with one application that have two Jtree Visivle. There tree are visible in left and right side of a frame. Using panels I have put SplitPanes in these . Now my problem is to draw a line from left tree node to a right tree node. Using paint method and getRowBound I use to find the points I am able to draw a line.
My problem is , now these two trees are in different panel so I will be having a different graphics object on these panels. Secondly once I draw a line and when I scroll any tree the lines become static . I want that lines should always remain with those node even when I am scrolling.
Please help me regarding this.
Regards,
Sandeephttp://forum.java.sun.com/thread.jsp?forum=54&thread=274709
-
Buenos días - Good morning
Mi pregunta la escribiré en español y en ingles y espero alguien tenga la solución.
I'll write my question in Spanish and English and I hope someone has the solution.
SPANISH
Creé una Macro en VBA que lee mas de 200.000 archivos de texto (.txt) los cuales tienen diferentes tamaños y cantidad de información dentro de ellos, de cada archivo necesito extraer la información de las 3 primeras lineas y las ultimas 10 lineas, las 3
primeras lineas es fácil ya que uso un "READLINE" 3 veces y voy capturando la información de las tres primeras lineas, para las ultimas 10 lineas las cuales están identificadas por un código inicial hago un ciclo que lee linea por linea hasta que
encuentra el numero 3 en un espacio especificado de la linea y de ahí captura la información de cada linea de texto que serian las 10 ultimas, el problema que tengo es que la cantidad de archivos y de información dentro de los archivos aumenta considerablemente
cada día y por tener el ciclo que lee cada una de las lineas de cada archivo de texto la Macro se demora cada vez mas a medida que aumenta la información y consume cada vez mas memoria de la maquina.
Necesito un método diferente que no lea linea por linea y que yo le pueda decir lea la linea (renglón) numero 1000 (ejemplo) y capture la información a partir de ahí para ahorrar algo de tiempo, o saber cuantas lineas de texto tiene el archivo .txt y decirle
que me lea a partir de (numero total de lineas del txt -(menos) 10 lineas) así me leería las 10 ultimas.
ENGLISH
I created a Macro in VBA that reads more than 200,000 text files (.txt) which have different sizes and quantity of information within them, each file need to extract the information from the first 3 lines and last 10 lines, 3 first lines is easy as using a
'READLINE "3 times and am capturing information from the first three lines, for the last 10 lines which are identified by an initial code I make a loop that reads line by line until it finds the number 3 in a specified area of the line and then capture
the information of each line of text that would be 10 last, the problem that I have is that the number of files and information within files significantly increases every day and having the loop that reads each line of each text file is delayed Macro increasingly
as more information and consume more and more memory on the machine.
I Need a different method not read line by line and I can tell you read the line (row) number 1000 (example) and capture the information from there to save some time or know how many lines of text have the file .txt and tell me read from (total number of lines
of txt - (minus) 10 lines) so I would read 10 last.
Here is the code I currently use
Dejo el código que uso actualmente
Dim fs, f, ts, REG
Set fso = CreateObject("Scripting.FileSystemObject")
On Error Resume Next
sFilePath = strFolder & "\" & strFileName
Set f = fso.getFile(sFilePath)
Set ts = f.OpenAsTextStream(1, 0)
REG = ts.READLINE
Ciclo para llegar hasta las ultimas 10 lineas
Cycle to reach the last 10 lines
For J = 1 To 200000
REG = ts.READLINE
If Val(Mid(REG, 6, 1)) = 3 ThenGood Morning ryguy72
First thank you so much for your answer, sorry for my english in the question, I tried for a long time to make a code that wasn't so slow to read the last 10 lines, 'cuz most codes used a cycle "For" to read line by line asking if in the specific
position is the character(number) that tells me that i should get started to read the last lines that i need, that takes a lot longer than your code doing a Split with Mydata and storing it in strData(). I don't know how to do this and every forum that
i consulted to read the last 10 lines quickly they made the same read line by line with a Cycle "for".
Thanks again, I gonna improve my code with your help, 'cuz it took about 4 hours to read all the information and everyday ascended more time and memory consumption.
Thanks to everyone who offered their help so disinterested and free, so should always be people with that spirit, I hope someday to be SO good as you programming. -
Need coordinate for particular tree node as currently expanded
Hi All,
i am working in flex for the past two months,currently i am
working on the drag and drop on a tree , where i am able to drag
one tree leaf node to another another tree leaf node and i am able
to draw a line between the two leaf node indicating that this has
been dragged from the previous tree of a particular node to the
current node of the tree.
The problem which i am facing is that when i collapse the
expanded tree , the line which i have drawn is not able to
synchronize with the tree expand or collapse (the line remains in
the same position even when the particular leaf node move down coz
of expansion of the above tree node.)
any help will be appreciated.there is a private function in the tree.as class:
private function getVisibleChildrenCount(item:Object):int
that I can use by multiplying how many children there are by
how tall each item "physically" displays on the screen as, but I
want to get that publicly. I don't want to go about hacking the
tree.as code, that's poor form in the highest. Does anybody else
have any ideas...
please? -
CSS inspector lacks "Add Property" icon and "tree" format.
This probably has a very simple solution, but here's the story: In all the tutorials, the CSS inspector window shows the CSS cascade formatted as a sort of tree, with lines connecting the various properties. When I open DreamWeaver, the inspector just shows the properties in a vertical column. Is there a way I can make it display the tree outline?
Also, there's no "Add Properties" icon on my CSS inspector.
I sincerely hope there's a quick fix for this.Assuming you have CSS style rules embedded in your page or the HTML document is linked to an external stylesheet, hit the ALL button.
To add a new rule, hit the + sign.
More on CS5 CSS Styles Panel.
http://help.adobe.com/en_US/dreamweaver/cs/using/WSbb8fae38174aec9d-4fb84361126e2b2aaf3-80 00.html
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb -
Help needed in resolving warnings while migrating to flash 4.6
Getting the below error in FlashBuilder 4.6:
1067: Implicit coersion of a value of type mx.controls:Tree to an unrelated type mx.controls:Tree
The line of code is below which is there in QueryTreeAs.as:
ModelLocator.getInstance().queryTree=queryTree;
where queryTree is a component in a different mxml file - QueryTree.mxml. Like the below one:
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
width="100%"
height="100%"
name="query"
creationComplete="init()">
<!--<mx:Style source="/assets/styles.css" />-->
<mx:Script>
<![CDATA[
include "QueryTreeAs.as"
]]>
</mx:Script>
<mx:Tree y="0"
id="queryTree"
width="100%"
height="100%"
showDataTips="true"
dataTipFunction="getDataTipLabel"
labelFunction="tree_labelFunc"
showRoot="true"/>
</mx:Canvas>
Any pointers to resolve this issue would be helpful!hey folks
I have found out that every time the PDF file is downloaded, in the firefox download manager, that opens up to show the status of the downloaded PDF, when I click on the "Remove" button once I open the much needed PDF, the PDF is not carried onto the next upload for some reason... but I still need to investigate in Netscape and see how it works..
thanks guys
I will come back to update you once I test it in netscape navigator
hepzi -
I just want to say that it is completely ridiculous for a company that claims to be cutting edge to
have such shoddy service when it comes to certification. Ordering an exam voucher should
not be that difficult. I ordered one and after waiting two days, called a rep, talked to someone
named Ajith, he said it would be out in a few hours, called back in a few hours, talked with
another person who contacted some other department, and I got an email back saying that they
had already sent it out! I then called back and asked to speak to a supervisor, the supervisor thenhad me forward the email I received to her, and then told me that they would get one sent to me in a "couple of hours". I said "A couple hours?" Was I speaking to Oracle or Enron? I asked to speak with their supervisor. So I then get someone on the line named Lynn, and she is going to "call me back"as soon as they get the voucher. I can understand occasional problems with computers and the like,but it really stands to reason that something as simple as an exam voucher should not take more thantwo days, in fact, it should not take 24 hours. As it stands, I am again waiting . . .They say 48 hours, but if you are registering, register earlier, I finally received my
information, and am registered for the exam.
They could really stand to improve this process, I hope someone from
management will look into this, because there is no reason why anyone
should have to spend their whole day chasing down the information they
need to take a test that they have paid in advance for. -
How to download list of transaction from SAP area menu in SAP1 transaction
Hello All,
My requirement is I want to download the list of transaction under the SAP area menu in SAP1 transaction.
I tried with SE43, entered area menu as S000, but it doesn't give me of the same hierarchy and some transaction were missing, for example IH08 is available in SAP1 transaction and not available in SE43.
Could you please let me know is there any way to download the list.
Regards,
ThangaIf you open SE43N, type SAP1 and Display (F7), Tree is shown with collapsed nodes. Print option in Menu shows the same tree as a list. The nodes do not get expanded by default.
So in order to get expanded tree in list ( so that transaction codes can be seen), you need to expand the tree before choosing Area Menu > Print.
This works for average area menu which is less number of transactions.
Since you are looking for SAP1, it has lot of transactions, and on expanding it, information message is shown as:
The tree could only be partially expanded for performance reasons
Diagnosis: The hierarchy could not be completely expanded for performance reasons; it has too many subnodes.
Procedure:
Restrict the number of nodes to be expanded by expanding a lower-level node
or
Expand this node repeatedly until this message no longer appears. The hierarchy is then completely expanded.
As a result, IH08 transaction which is under Quality Management node can't be seen in list view as overflow occurred before this node was reached.
On debugging, it can be seen that the tree is expanded recursively by standard until an overflow flag is set.
In order to get around this overflow protection, you can write a custom code.
Below snippet is for demonstration purpose.
1. Run FM BMENU_DISPLAY_RSTREE in SE37 with tree_id as QM01
2. Run my snippet that calls same FM in the end
Compare 2 outputs and see the difference.
I am going 1 level deep and IH08 transaction can be seen in output.
Similarly, you can write a code that recursively expands every sub-tree found so that entire list can be seen.
DATA: ls_nodes TYPE hier_iface,
lt_nodes TYPE STANDARD TABLE OF hier_iface,
lt_nodes1 TYPE STANDARD TABLE OF hier_iface,
lt_nodes2 TYPE STANDARD TABLE OF hier_iface,
lt_refs1 TYPE STANDARD TABLE OF hier_ref,
lt_refs2 TYPE STANDARD TABLE OF hier_ref,
lt_text1 TYPE STANDARD TABLE OF hier_texts,
lt_text2 TYPE STANDARD TABLE OF hier_texts,
lv_tree_id TYPE hier_guid VALUE 'QM01'.
* read top level node
CALL FUNCTION 'STREE_HIERARCHY_READ'
EXPORTING
structure_id = lv_tree_id
read_also_texts = abap_true
TABLES
list_of_nodes = lt_nodes
list_of_references = lt_refs2
list_of_texts = lt_text2.
* read hierarchies of sub-trees
lt_nodes2 = lt_nodes.
LOOP AT lt_nodes INTO ls_nodes WHERE node_type EQ 'AMRF'.
CLEAR: lt_nodes1, lt_refs1, lt_text1.
CALL FUNCTION 'STREE_HIERARCHY_READ'
EXPORTING
structure_id = ls_nodes-reftree_id
read_also_texts = abap_true
TABLES
list_of_nodes = lt_nodes1
list_of_references = lt_refs1
list_of_texts = lt_text1.
* add sub-tree details to main tree
APPEND LINES OF lt_nodes1 TO lt_nodes2.
APPEND LINES OF lt_refs1 TO lt_refs2.
APPEND LINES OF lt_text1 TO lt_text2.
ENDLOOP.
CALL FUNCTION 'BMENU_DISPLAY_RSTREE'
EXPORTING
tree_id = lv_tree_id " Unique ID - 32 Characters
TABLES
list_of_nodes = lt_nodes2 " Hierarchy Maintenance Tool Node Passing Interface
list_of_refs = lt_refs2 " List of References to Structure Items
list_of_texts = lt_text2. " General Structure Repository Node Text -
I am trying to install and run beryl on a laptop with ATI Radeon XPRESS 200M.
Following the instructions here: http://wiki.archlinux.org/index.php/Beryl
I have uninstalled ati-fglrx and ati-fglrx-utils and installed libgl-dri but after several hours on this forums and google i cant find how to solve this. ( I have no 3d rendering, so I cant run beryl)
What al I doing wrong?
THIS IS MY xorg.conf.
+++++++++++++++++
# /etc/X11/xorg.conf (xorg X Window System server configuration file)
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
# Edit this file with caution, and see the /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg
Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "aticonfig-Screen[0]" 0 0
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "stylus" "SendCoreEvents"
InputDevice "cursor" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"
InputDevice "Synaptics Touchpad"
#linea siguiente agregada 19 nov 2006
Option "AIGLX" "true"
EndSection
Section "Files"
# path to defoma fonts
FontPath "/usr/share/fonts/misc"
FontPath "/usr/share/fonts/cyrillic"
FontPath "/usr/share/fonts/100dpi/:unscaled"
FontPath "/usr/share/fonts/75dpi/:unscaled"
FontPath "/usr/share/fonts/Type1"
FontPath "/usr/share/fonts/100dpi"
FontPath "/usr/share/fonts/75dpi"
FontPath "/usr/share/fonts/X11/misc"
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection
Section "Module"
Load "i2c"
Load "bitmap"
Load "ddc"
Load "dri"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "type1"
Load "vbe"
EndSection
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "CoreKeyboard"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "es"
Option "XkbOptions" "lv3:ralt_switch"
EndSection
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
EndSection
Section "InputDevice"
Identifier "Synaptics Touchpad"
Driver "synaptics"
Option "SendCoreEvents" "true"
Option "Device" "/dev/psaux"
Option "Protocol" "auto-dev"
Option "HorizScrollDelta" "0"
EndSection
Section "InputDevice"
# /dev/input/event
# for USB
Identifier "stylus"
Driver "wacom"
Option "Device" "/dev/wacom" # Change to
Option "Type" "stylus"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "InputDevice"
# /dev/input/event
# for USB
Identifier "eraser"
Driver "wacom"
Option "Device" "/dev/wacom" # Change to
Option "Type" "eraser"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "InputDevice"
# /dev/input/event
# for USB
Identifier "cursor"
Driver "wacom"
Option "Device" "/dev/wacom" # Change to
Option "Type" "cursor"
Option "ForceDevice" "ISDV4" # Tablet PC ONLY
EndSection
Section "Monitor"
Identifier "Generic Monitor"
Option "DPMS"
EndSection
Section "Monitor"
Identifier "aticonfig-Monitor[0]"
Option "VendorName" "ATI Proprietary Driver"
Option "ModelName" "Generic Autodetecting Monitor"
Option "DPMS" "true"
EndSection
Section "Device"
Identifier "ATI Technologies, Inc. Radeon Xpress 200M (RS480)"
#Este es el original Driver "ati"
Driver "radeon"
#siguiente linea agregada 19 nov 2006
BusID "PCI:1:0:0"
#Linea comentada 19 nov BusID "PCI:1:5:0"
#tres siguientes lineas agregadas 17nov
Option "UseFBDev" "true"
Option "EnablePageFlip"
Option "ColorTiling"
#tres siguientes lineas agregadas 19 nov
Option "AGPMode" "8"
Option "AGPFastWrite" "true"
Option "RenderAccel" "true"
EndSection
Section "Device"
Identifier "aticonfig-Device[0]"
#Este es el original Driver "fglrx"
Driver "radeon"
#aqui van dos lineas agregadas 17nov
Option "VideoOverlay" "on"
Option "OpenGLOverlay" "off"
#2 lineas siguientes agregadas 19 nov
Option "XAANoOffscreenPixmaps" "true"
Option "DRI" "true"
EndSection
Section "Screen"
Identifier "Default Screen"
Device "ATI Technologies, Inc. Radeon Xpress 200M (RS480)"
Monitor "Generic Monitor"
DefaultDepth 24
SubSection "Display"
Depth 1
Modes "1280x768"
EndSubSection
SubSection "Display"
Depth 4
Modes "1280x768"
EndSubSection
SubSection "Display"
Depth 8
Modes "1280x768"
EndSubSection
SubSection "Display"
Depth 15
Modes "1280x768"
EndSubSection
SubSection "Display"
Depth 16
Modes "1280x768"
EndSubSection
SubSection "Display"
Depth 24
Modes "1280x768"
EndSubSection
EndSection
Section "Screen"
Identifier "aticonfig-Screen[0]"
Device "aticonfig-Device[0]"
Monitor "aticonfig-Monitor[0]"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
Section "DRI"
Mode 0666
EndSection
Section "Extensions"
Option "Composite" "Enable"
EndSection
+++++++++++++++++
THIS ARE MY MODULES IN rc.conf:
MODULES=(8139too bcm43xx sis_agp !agpart radeon drm ati-agp !fglrx
radeon)
Help!I am not sure about 3D redering works with OSS but I found this in this place:
http://wiki.archlinux.org/index.php/Beryl
ATI
You should read this if you have prolems with ATI.
[edit]
Uninstalling fglrx
Don't forget that:
* xf86-video-ati are the ATI open source drivers
* ati-fglrx(-beyond, ...) are the proprietary ones wich won't work with Beryl
* You have to replace "fglrx" by "radeon" in BOTH the xorg.conf and rc.conf files
* You have to uninstall ati-fglrx(-beyond, ...), ati-fglrx-utils and then install libgl-dri to get everything to work properly. As Veek said on this post :
Attention, anyone who was previously using the fglrx drivers:
Both the ati-fglrx-utils package and the libgl-dri package provide a version of the openGL
shared library /usr/lib/libGL.so.1 (your version may be different).
However the one supplied by the Mesa package implements things not implemented by the one in ATI's package.
That's why it can be exceedingly confusing trying to figure out why things aren't working
even though you apparently have the necessary libraries.
The solution is to install libgl-dri and everything shoud work as outlined in spack's guide.
This is my understanding of the issue, just wanted to clarify for anyone else that was confused.
* Uninstalling commands:
pacman -Rd ati-fglrx(-beyond,...) ati-fglrx-utils
pacman -S libgl-dri
[edit]
So, i suppose it works.
In the other hand I have cleaned the modules loading to leave "radeon" only once.
What else can I do?
Thanx -
Folks - I'm new to Java and hence requesting some assitance in something I'm working on. I want to read a ascii file that constains some containment hierarchy eg., The file is listed below.
<pre>
# First field is parent, and fields seprated by '=' are childs.
NodeA=NodeC, NodeD, NodeE
NodeE=NodeZ,NodeK
NodeK=NodeF
</pre>
I have no problem in reading the file, and parsing/tokenizing it at all.
How can I use the information here in creating a dynamic JTree.
Any help would be greatly appreciated.Folks - I'm new to Java and hence requesting some
assitance in something I'm working on. I want to read
a ascii file that constains some containment hierarchy
eg., The file is listed below.
<pre>
# First field is parent, and fields seprated by '='
are childs.
NodeA=NodeC, NodeD, NodeE
NodeE=NodeZ,NodeK
NodeK=NodeF
</pre>
I have no problem in reading the file, and
parsing/tokenizing it at all.
How can I use the information here in creating a
dynamic JTree.
Any help would be greatly appreciated.- i assume that every node is named something unique and there can be no duplicates
- can you guarantee the order of the file? Is it always from the root downwards? ie. can you guarantee that the when you see "NodeE" in the first line that NodeE has not already been created? these details will greatly affect your algorithm. typically if you can guarantee a certain order or format of the file, it will greatly improve the efficiency of the algorithm
- here's an algorithm that would do the tree-building line by line, regardless of order, assuming no two nodes can be named the same thing, but it would probably be better to read in the entire file, storing the information in a vector or something and then go through all the data at once
- this algorithm should be applied after every line is read in; after the last line in the file is read in, the entire tree will be created: how do you know what is the root node?
- read in each line as: parent, child1, child2, etc...
- if a node named "parent" has not already been created, create a node named "parent":
DefaultMutableTreeNode node = new DefaultMutableTreeNode(parent);
- for each child, if a node named "child1" has not already been created, create a node named "child1" and add it as a child to "parent"
DefaultMutableTreeNode child = new DefaultMutableTreeNode(parent);
node.add(child);
- this algorithm is a pain because you always have to check if a node has already been created -
Hi All,
I am working with one application that have two Jtree Visivle. There tree are visible in left and right side of a frame. Using panels I have put SplitPanes in these . Now my problem is to draw a line from left tree node to a right tree node. Using paint method and getRowBound I use to find the points I am able to draw a line.
My problem is , now these two trees are in different panel so I will be having a different graphics object on these panels. Secondly once I draw a line and when I scroll any tree the lines become static . I want that lines should always remain with those node even when I am scrolling.
Please help me regarding this.
Regards,
SandeepTry this, or use email [email protected]
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.util.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.tree.DefaultTreeCellRenderer;
public class TreeP extends JFrame
JTree jtR;
JTree jtL;
JScrollPane jsL;
JScrollPane jsR;
Vector con = new Vector();
MyTreeCellRenderer tcl = new MyTreeCellRenderer(con);
Tpan panel = new Tpan();
int from = -1;
int mark = -1;
Point toP = new Point(0,0);
boolean st = true;
int sn = 0;
public TreeP()
setBounds(1,1,600,400);
getContentPane().setLayout(new BorderLayout());
addWindowListener(new WindowAdapter()
{ public void windowClosing(WindowEvent ev)
{ dispose();
System.exit(0);
panel.setBorder(new EmptyBorder(4,4,4,4));
LeftTree();
RightTree();
jsL = new JScrollPane(jtL);
jsL.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
jsR = new JScrollPane(jtR);
jsL.getVerticalScrollBar().addAdjustmentListener(new AdjustmentListener()
{ public void adjustmentValueChanged(AdjustmentEvent a)
repaint();
jsR.getVerticalScrollBar(). addAdjustmentListener(new AdjustmentListener()
{ public void adjustmentValueChanged(AdjustmentEvent a)
repaint();
panel.add("West",jsL);
panel.add("East",jsR);
getContentPane().add("Center",panel);
JPanel butt = new JPanel();
butt.setPreferredSize(new Dimension(0,22));
butt.setLayout(new GridLayout(0,5,10,10));
butt.setBorder(new EmptyBorder(1,5,0,0));
getContentPane().add("South",butt);
JButton jbc = new JButton("Connect");
butt.add(jbc);
jbc.addActionListener(new ActionListener()
{ public void actionPerformed( ActionEvent e )
connect();
JButton jbd = new JButton("DisConnect");
butt.add(jbd);
jbd.addActionListener(new ActionListener()
{ public void actionPerformed( ActionEvent e )
if (mark > -1)
con.remove(mark);
mark = -1;
panel.repaint();
jtL.addKeyListener(new MyKeyListener());
setVisible(true);
private void LeftTree()
Vector v1 = new Vector();
for (int i=0; i < 451; i++) v1.add("l "+i+" entry "+(199-i));
jtL = new JTree(v1);
jtL.setPreferredSize(new Dimension(200,70*20+15));
jtL.setSize(200,451*20+10);
jtL.setBorder(new MatteBorder(1,1,1,1,Color.orange));
jtL.setCellRenderer(tcl);
jtL.addMouseListener(new MouseAdapter()
{ public void mousePressed(MouseEvent m)
// L.p("p "+m.getX());
from = jtL.getClosestRowForLocation(m.getX(),m.getY());
// L.p(""+from);
toP.setLocation(-1,-1);
jtL.setSelectionRow(from);
public void mouseReleased(MouseEvent m)
int x = m.getX() - jsR.getX() + 4;
Rectangle vl = jsL.getViewport().getViewRect();
Rectangle vr = jsR.getViewport().getViewRect();
if (x > 1)
int t = jtR.getClosestRowForLocation(x,m.getY()-vl.y+vr.y);
jtR.setSelectionRow(t);
connect();
from = -1;
panel.repaint();
jtL.addMouseMotionListener(new MouseMotionAdapter()
{ public void mouseDragged(MouseEvent m)
if (from > -1)
toP.setLocation(m.getX()+4,m.getY()+4);
panel.repaint();
private void RightTree()
Vector v1 = new Vector();
for (int i=0; i < 70; i++) v1.add("r "+i+" entry "+(199-i));
jtR = new JTree(v1);
jtR.setPreferredSize(new Dimension(200,70*20+15));
jtR.setSize(200,70*20+10);
jtR.setBorder(new MatteBorder(1,1,1,1,Color.blue));
jtR.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
jtR.setCellRenderer(tcl);
private void connect()
if (jtR.getSelectionCount() != 1) return;
if (jtL.getSelectionCount() != 1) return;
int [] sr = jtR.getSelectionRows();
int [] sl = jtL.getSelectionRows();
con.add(new Point(sl[0],sr[0]));
panel.repaint();
private void disConnect()
if (jtR.getSelectionCount() != 1) return;
if (jtL.getSelectionCount() != 1) return;
int [] sr = jtR.getSelectionRows();
int [] sl = jtL.getSelectionRows();
for (int k=0; k < con.size(); k++)
Point p = (Point)con.get(k);
if (sl[0] == p.x && sr[0] == p.y) con.remove(k--);
panel.repaint();
public class Tpan extends JPanel
Rectangle ll;
Rectangle rr;
public Tpan()
// super(JSplitPane.HORIZONTAL_SPLIT);
// setDividerSize(88);
// setDividerLocation(188);
setLayout(new BorderLayout());
setPreferredSize(new Dimension(500,100));
addMouseListener(new MouseAdapter()
{ public void mousePressed(MouseEvent m)
findLine(m.getX(),m.getY());
private void findLine(int x,int y)
mark = -1;
for (int k=0; k < con.size(); k++)
calculateLine(k);
Line2D line = new Line2D.Double(ll.x,ll.y-1,rr.x,rr.y+1);
if (line.ptLineDist(x,y) < 2)
mark = k;
panel.repaint();
public void paint(Graphics g)
super.paint(g);
myPaint(g);
public void myPaint(Graphics g)
for (int k=0; k < con.size(); k++)
calculateLine(k);
Rectangle vl = jsL.getViewport().getViewRect();
Rectangle vr = jsR.getViewport().getViewRect();
if (k == mark) g.setColor(Color.red);
else g.setColor(Color.black);
g.fillRect(ll.x-9,ll.y-vl.y,9,1);
g.drawLine(ll.x-1,ll.y-vl.y,rr.x,rr.y-vr.y);
g.fillRect(rr.x+1,rr.y-vr.y,13,1);
g.setColor(Color.gray);
if (from > -1 && toP.x > -1)
Rectangle ll = jtL.getRowBounds(from);
Rectangle vl = jsL.getViewport().getViewRect();
ll.y = ll.y + 4 + ll.height / 2 - vl.y;
ll.x = jtL.getX()+jtL.getWidth();
g.drawLine(ll.x-20,ll.y,toP.x,toP.y-vl.y);
private void calculateLine(int k)
Point p = (Point)con.get(k);
ll = jtL.getRowBounds(p.x);
rr = jtR.getRowBounds(p.y);
ll.y = ll.y + 4 + ll.height / 2;
rr.y = rr.y + 4 + rr.height / 2;
ll.x = jsL.getX()+jsL.getWidth()-1;
rr.x = jsR.getX();
public class MyTreeCellRenderer extends DefaultTreeCellRenderer
MyCell mL = new MyCell(0);
MyCell mR = new MyCell(15);
Vector vc;
public MyTreeCellRenderer(Vector v)
super();
vc = v;
public Component getTreeCellRendererComponent(JTree tree,
Object value,
boolean selected,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus)
boolean b = false;
if (tree.getComponentOrientation() == ComponentOrientation.RIGHT_TO_LEFT)
for (int k=0; k < con.size(); k++)
if (((Point)con.get(k)).y == row) b = true;
mR.setText(value.toString(),selected, b);
return(mR);
else
for (int k=0; k < con.size(); k++)
if (((Point)con.get(k)).x == row) b = true;;
mL.setText(value.toString(),selected, b);
return(mL);
public class MyCell extends JComponent
String text = "";
boolean sel = false;
boolean con = false;
int x = 0;
ImageIcon i2 = new ImageIcon("bindi.gif");
ImageIcon i1 = new ImageIcon("attribute.gif");
FontMetrics fm = null;
public MyCell(int or)
super();
x = or;
setPreferredSize(new Dimension(190,20));
public void setText(String s, boolean b, boolean b1)
text = s;
sel = b;
con = b1;
repaint();
public void paint(Graphics g)
super.paintComponent(g);
fm = getFontMetrics(g.getFont());
if (sel)
g.setColor(Color.orange);
g.fillRect(x+18,1,135,17);
g.setColor(Color.black);
if (x == 0)
g.drawString(text,21,13);
g.drawImage(i1.getImage(),0,0,null);
if (con) g.drawImage(i2.getImage(),161,4,null);
if (x != 0)
int w = fm.stringWidth(text);
g.drawString(text,x+150-w,13);
if (con) g.drawImage(i2.getImage(),x,4,null);
g.drawImage(i1.getImage(),x+158,0,null);
class MyKeyListener extends KeyAdapter
public void keyPressed(KeyEvent e)
st = false;
public void keyReleased(KeyEvent e)
int i[] = jtL.getSelectionRows();
jtL.clearSelection() ;
st=true;
jtL.setSelectionRow(i[0]);
public static void main (String[] args) throws InterruptedException
new TreeP();
Noah
Maybe you are looking for
-
HP LaserJet 4200 -- manual feed tray not working after 10.6 install
Hi all... One of my users pointed this out to me. I'm looking for confirmation (or a solution)? We have an HP LaserJet 4200 printer added to our mac clients as an IP printer. Under 10.5.8, printing to "Tray 1 (Manual)" goes where you think it would -
-
How to restrict users from printing documents and exporting to local file
Hi SAP gurus, I have two questions. 1. How can I restrict users from printing a document? i.e. billdoc? I would like to know if I could block it though authorization. If yes, what auth obj to use? 2. How to restrict certain users from exporting to lo
-
Text field spry validation over 2 table cells?
Hello, This might be a real simple thing, but I can't figure it out. Can anyone please help? I'm using DW CS3 and I'm building a contact form. I'm using DW's Spry validation for my text field. It's an email field. I'd like to put the label in one
-
I can not download anythign with firefox.
When I right click and save to a folder the file will appear in the download manager and appears to download, but when I try to find the file in the folder its not there, and when I right click on the file in the download manager the "open file" and
-
What to do fcp x dosent open. it sticks on restoring window layout page