[#1564] Add component information box
This commit is contained in:
parent
ede9dfe700
commit
10d36145cf
@ -826,7 +826,6 @@ ringcompcfg.Radialdirection = Radial direction:
|
||||
ringcompcfg.radialdirectionfrom = The radial direction from the rocket centerline
|
||||
ringcompcfg.but.Reset = Reset
|
||||
ringcompcfg.but.Resetcomponant = Resets the component to the rocket centerline.
|
||||
ringcompcfg.EngineBlock.desc = <html>An <b>engine block</b> stops the motor from moving forwards in the motor mount tube.<br><br>In order to add a motor, create a <b>body tube</b> or <b>inner tube</b> and mark it as a motor mount in the <em>Motor</em> tab.
|
||||
ringcompcfg.note.desc = Note: An inner tube will not affect the aerodynamics of the rocket even if it is located outside of the body tube.
|
||||
|
||||
|
||||
@ -979,6 +978,31 @@ RocketCompCfg.tab.Outside = Outside
|
||||
RocketCompCfg.tab.Inside = Inside
|
||||
RocketCompCfg.tab.RightSide = Right Side
|
||||
RocketCompCfg.tab.LeftSide = Left Side
|
||||
RocketCompCfg.btn.ComponentInfo.ttip = Show/hide informative text about this component.
|
||||
|
||||
! ComponentInfo
|
||||
ComponentInfo.Rocket = This is your rocket. Nothing more to say about it. Have fun designing and building it! :)
|
||||
ComponentInfo.AxialStage = A <b>stage</b> is a <b>section</b> of the model rocket that contains <b>motors</b> which ignite successively and <b>separate</b> after motor burnout.<br>Each stage must safely descend after separation. The main stage, often called the <b>'Sustainer'</b>, usually descends with a <b>recovery device</b>.
|
||||
ComponentInfo.ParallelStage = A <b>booster</b> is a fictional component that acts as an <b>attachment</b> point to a <b>body tube</b> and can <b>separate</b> from that body tube at a specified time during flight.<br>The most common use of a booster is the attachment of a <b>glider</b>.
|
||||
ComponentInfo.PodSet = A <b>pod</b> is a fictional component that acts as an <b>attachment</b> point to a <b>body tube</b>.<br>Once defined, other components can be attached to the pod to create complex rocket geometries.
|
||||
ComponentInfo.NoseCone = A <b>nose cone</b> is the <b>front end</b> of the rocket airframe. Nose cones vary widely in shape.<br>The back end can be cut down to form an <b>internal shoulder</b> that slides inside of a body tube to hold the nose cone in place.
|
||||
ComponentInfo.BodyTube = A <b>body tube</b> is primarily used for the <b>structure</b> of the exterior body of the model rocket.
|
||||
ComponentInfo.Transition = A <b>transition</b> is the part of the airframe that <b>connects</b> two <b>body tubes</b> having <b>different</b> outside <b>diameters</b>.<br>Both ends of a transition are cut down to form an internal shoulder that slides inside of each body tube to hold the transition in place at both ends.
|
||||
ComponentInfo.TrapezoidalFinSet = Fins help <b>stabilize</b> the rocket. The most common fin shape is <b>trapezoidal</b>, four sides with parallel root and tip chords (the edge that glues to the body tube and the outer edge).
|
||||
ComponentInfo.EllipticalFinSet = Fins help <b>stabilize</b> the rocket. The most efficient fin shape is <b>elliptical</b>. This shape induces the <b>least amount of drag</b> of any fin shape. It is commonly used for competition flying events.
|
||||
ComponentInfo.FreeformFinSet = Fins help <b>stabilize</b> the rocket. The most versatile fin component is the <b>freeform fin</b>. This fin component allows the creation of virtually any solid fin shape, with the ability to manually enter data points or import a shape from an image file.
|
||||
ComponentInfo.TubeFinSet = <b>Tube fins</b> are used to keep the model rocket going <b>straight after launch</b>. Tube fins vary in length and diameter, and may have either straight or curved ends.<br>Currently, OpenRocket only supports straight-perpendicular cut ends.
|
||||
ComponentInfo.RailButton = <b>Rail buttons</b> keep the model rocket from <b>changing orientation</b> when it launches. Rail buttons are often used in <b>conjunction</b> with <b>launch lugs</b>, and in pairs.<br>They can be mounted to the outside of the body tube with a screw and internal nut.<br>A rail button looks like two washers with a spacer in between; one washer is against the body tube and the other slides inside the launch rail.
|
||||
ComponentInfo.LaunchLug = A <b>launch lug</b> is the most common guide used to keep smaller model rockets from <b>changing orientation</b> until the rocket leaves the end of the launch rod.
|
||||
ComponentInfo.InnerTube = <b>Inner tubes</b> are most commonly used for <b>motor tubes</b>, but may also be part of other internal systems, such as an ejection baffles and adjustable weight designs.<br>Inner tubes may be positioned radially inside of a body tube and, when used as a motor tube, may be clustered.
|
||||
ComponentInfo.TubeCoupler = A <b>coupler</b> is a short tube that <b>connects</b> two <b>body tubes</b> having the <b>same diameters</b>.<br>In model rockets that use electronics, a coupler may be used for the <b>avionics bay</b>.<br>The body tubes are often glued to the coupler to stop them from gliding.
|
||||
ComponentInfo.CenteringRing = <b>Centering rings</b> are used to <b>position</b> one or more <b>inner tubes</b> inside of a <b>body tube</b>.<br>Fin sets have an <b>automatic fin tab</b> feature for determining an ideal fin tab configuration based on an inner tube positioned below the root chord of the fins. This also requires two centering below the root chord.
|
||||
ComponentInfo.Bulkhead = A <b>bulkhead</b> is a disk that may or may not have a small hole in the center. Bulkheads are used to <b>seal</b> one area of a model rocket from another or to mount recovery system eyes for <b>shock cord attachment</b>, such as nose cone caps and avionics bay lids.
|
||||
ComponentInfo.EngineBlock = An <b>engine block stops</b> the <b>motor</b> from <b>moving forwards</b> in the motor mount tube.<br>In order to add a motor, create a <b>body tube</b> or <b>inner tube</b> and mark it as a motor mount in the <em>Motor</em> tab.
|
||||
ComponentInfo.Parachute = The <b>parachute</b> is the most common <b>recovery device</b>. Model rocket parachutes are made of thin, light-weight materials, such as polyethylene or Mylar, and may be decorated in bright and contrasting colors/patterns.<br><b>Shroud lines</b> attach the parachute <b>canopy</b> to the <b>shock cord</b>. The shroud lines are sometimes brought together and attached using a swivel.
|
||||
ComponentInfo.Streamer = A <b>streamer</b> is a <b>recovery device</b> that, when ejected, unrolls and <b>slows</b> the model <b>rocket</b> during descent.<br>A shock cord is a long, narrow, <b>rectangular strip</b> of crepe paper or thin plastic film. The width and length of the streamer are adjusted to match the weight of the rocket, but <b>10 to 1</b> is considered the best <b>length to width ratio</b> for a streamer.
|
||||
ComponentInfo.ShockCord = A <b>shock cord</b> attaches the <b>nose cone</b> and <b>recovery device</b> to the <b>body tube</b>, keeping the model rocket together during <b>descent</b>.<br>Smaller rockets commonly have short elastic shock cords, while larger rockets have long shock cords made from materials such as Nylon or heat resistant Kevlar webbing.
|
||||
ComponentInfo.MassComponent = A <b>mass component</b> may be used to simulate a <b>component</b> that is <b>not otherwise listed</b>.<br>In OpenRocket, this component type may be designated for instance as an <b>altimeter</b>, a <b>flight computer</b>, a <b>battery</b>\u2026 Each designation has its own unique icon to ease identification.
|
||||
|
||||
! BulkheadConfig
|
||||
BulkheadCfg.tab.Diameter = Diameter:
|
||||
|
@ -817,7 +817,6 @@ ringcompcfg.Radialdirection = :الإتجاه الشعاعي
|
||||
ringcompcfg.radialdirectionfrom = :الإتجاه الشعاعي من خط الوسط للصاروخ
|
||||
ringcompcfg.but.Reset = إعادة ضبط
|
||||
ringcompcfg.but.Resetcomponant = .يعيد تعيين المكون إلى خط الوسط للصاروخ
|
||||
ringcompcfg.EngineBlock.desc = <html>.كتلة المحرك تمنعه من التحرك للأمام في أنبوب الحامل للمحرك<br><br>.من أجل إضافة محرك ، قم بإنشاء أنبوب جسم أو أنبوب داخلي وقم بتمييزه على أنه حامل محرك في علامة تبويب المحرك
|
||||
ringcompcfg.note.desc = .ملاحظة: الأنبوب الداخلي لن يؤثر على الديناميكا الهوائية للصاروخ حتى لو كان موجودًا خارج أنبوب الجسم
|
||||
|
||||
|
||||
@ -971,6 +970,9 @@ RocketCompCfg.tab.Inside = من الداخل
|
||||
RocketCompCfg.tab.RightSide = الجانب اليميني
|
||||
RocketCompCfg.tab.LeftSide = الجانب اليساري
|
||||
|
||||
! ComponentInfo
|
||||
ComponentInfo.EngineBlock = .كتلة المحرك تمنعه من التحرك للأمام في أنبوب الحامل للمحرك<br><br>.من أجل إضافة محرك ، قم بإنشاء أنبوب جسم أو أنبوب داخلي وقم بتمييزه على أنه حامل محرك في علامة تبويب المحرك
|
||||
|
||||
! BulkheadConfig
|
||||
BulkheadCfg.tab.Diameter = :القطر
|
||||
BulkheadCfg.tab.Thickness = :السماكة
|
||||
|
@ -568,7 +568,6 @@ ringcompcfg.Radialdirection = Radi
|
||||
ringcompcfg.radialdirectionfrom = Radiální vzdálenost od smeru osy
|
||||
ringcompcfg.but.Reset = Reset
|
||||
ringcompcfg.but.Resetcomponant = Resetuj komponentu od osy rakety
|
||||
ringcompcfg.EngineBlock.desc = <html>An <b>blok motoru</b> zastaví motor v pohybu vzad v motorové trubici.<br><br>Pokud se pridá motor vytvorí <b>telo</b> nebo <b>skrytou trubku tube</b> a oznací ji jako montá\u017E motoru v<em>Motoru</em> tab.
|
||||
ringcompcfg.note.desc = Poznámka: Vnitrní trubka nemá effekt na aerodynamiku motoru i kdy\u017E je umístena mimo telo rakety.
|
||||
|
||||
|
||||
@ -662,6 +661,9 @@ RocketCompCfg.title.Aftshoulder = Dr\u017E
|
||||
RocketCompCfg.border.Foreshoulder = Dr\u017Eák prídi
|
||||
!RocketCompCfg.lbl.Length = Délka:
|
||||
|
||||
! ComponentInfo
|
||||
ComponentInfo.EngineBlock = An <b>blok motoru</b> zastaví motor v pohybu vzad v motorové trubici.<br><br>Pokud se pridá motor vytvorí <b>telo</b> nebo <b>skrytou trubku tube</b> a oznací ji jako montá\u017E motoru v<em>Motoru</em> tab.
|
||||
|
||||
! BulkheadConfig
|
||||
BulkheadCfg.tab.Diameter = Prumer:
|
||||
BulkheadCfg.tab.Thickness = Tlou\u0161tka:
|
||||
|
@ -625,7 +625,6 @@ ringcompcfg.Radialdirection = Radiale Richtung
|
||||
ringcompcfg.radialdirectionfrom = Die radiale Richtung von der Raketenmittellinie
|
||||
ringcompcfg.but.Reset = Zurücksetzen
|
||||
ringcompcfg.but.Resetcomponant = Komponente auf die Raketenmittellinie zurücksetzen
|
||||
ringcompcfg.EngineBlock.desc = <html>Eine <b>Motorhalterung</b> verhindert, dass der Motor sich im Rohr nach vorne bewegt.<br><br>Um einen Motor hinzuzufügen, ein <b>Körperrohr</b> oder ein <b>Innenrohr</b> hinzufügen und im Reiter <em>Motor</em> als Motorhalterung markieren.
|
||||
ringcompcfg.note.desc = Hinweis: Innenrohre beeinflussen die Aerodynamik der Rakete nicht, auch wenn sie außerhalb des Körperohres liegen.
|
||||
|
||||
|
||||
@ -719,6 +718,9 @@ RocketCompCfg.title.Aftshoulder = Schulter hinten
|
||||
RocketCompCfg.border.Foreshoulder = Schulter vorn
|
||||
!RocketCompCfg.lbl.Length = Length:
|
||||
|
||||
! ComponentInfo
|
||||
ComponentInfo.EngineBlock = Eine <b>Motorhalterung</b> verhindert, dass der Motor sich im Rohr nach vorne bewegt.<br><br>Um einen Motor hinzuzufügen, ein <b>Körperrohr</b> oder ein <b>Innenrohr</b> hinzufügen und im Reiter <em>Motor</em> als Motorhalterung markieren.
|
||||
|
||||
! BulkheadConfig
|
||||
BulkheadCfg.tab.Radius = Radius:
|
||||
BulkheadCfg.tab.Thickness = Wandstärke:
|
||||
|
@ -869,6 +869,9 @@ RocketCompCfg.title.Noseconeshoulder = Acople de la ojiva
|
||||
RocketCompCfg.ttip.Endcapped = Si el extremo del soporte est\u00e1 truncado.
|
||||
RocketCompCfg.lbl.Componentname.ttip = El nombre del componente.
|
||||
|
||||
! ComponentInfo
|
||||
ComponentInfo.EngineBlock = Un <b>ret\u00e9n de motor</b> impide que el motor se desplace hacia delante, por dentro del tubo porta motor.<br><br>Para a\u00f1adir un motor, cree un <b>Cuerpo tubular</b> o <b>Tubo interior</b> y des\u00edgnelo como porta motor en la pesta\u00f1a <em>Motor</em>.
|
||||
|
||||
RocketComponent.Position.ABSOLUTE = Extremo de la ojiva
|
||||
RocketComponent.Position.AFTER = Despu\u00e9s del componente
|
||||
RocketComponent.Position.BOTTOM = Extremo inferior del componente
|
||||
@ -1705,7 +1708,6 @@ update.dlg.latestVersion = Usted est\u00e1 utilizando la \u00faltima versi\u00f3
|
||||
|
||||
ringcompcfg.Automatic = Autom\u00e1tico
|
||||
ringcompcfg.Distancefrom = Distancia desde la l\u00ednea central del cohete:
|
||||
ringcompcfg.EngineBlock.desc = <html>Un <b>ret\u00e9n de motor</b> impide que el motor se desplace hacia delante, por dentro del tubo porta motor.<br><br>Para a\u00f1adir un motor, cree un <b>Cuerpo tubular</b> o <b>Tubo interior</b> y des\u00edgnelo como porta motor en la pesta\u00f1a <em>Motor</em>.
|
||||
ringcompcfg.InnerRadius = Radio interior:
|
||||
ringcompcfg.Length = Longitud:
|
||||
! Ring Component Config
|
||||
|
@ -861,6 +861,9 @@ RocketCompCfg.title.Noseconeshoulder = Epaulement du c\u00F4ne
|
||||
RocketCompCfg.ttip.Endcapped = Pr\u00E9cise si l'arri\u00E8re du c\u00F4ne est clos.
|
||||
RocketCompCfg.lbl.Componentname.ttip = Le nom de la pi\u00E8ce.
|
||||
|
||||
! ComponentInfo
|
||||
ComponentInfo.EngineBlock = Un <b>bloc moteur </b> emp\u00EAche le moteur de se d\u00E9placer vers l'avant dans le tube porte moteur.<br><br>Pour ajouter un moteur, cr\u00E9er un <b>tube</b> ou un <b>tube interne</b> et marquer le comme porte moteur dans l'onglet <em>Moteur</em>.
|
||||
|
||||
RocketComponent.Position.ABSOLUTE = Pointe de l'ogive
|
||||
RocketComponent.Position.AFTER = Apr\u00E8s la pi\u00E8ce parente
|
||||
RocketComponent.Position.BOTTOM = Bas de la pi\u00E8ce parente
|
||||
@ -1696,7 +1699,6 @@ update.dlg.latestVersion = Vous utilisez la derni\u00E8re version d'OpenRocket,
|
||||
|
||||
ringcompcfg.Automatic = Automatique
|
||||
ringcompcfg.Distancefrom = Distance de l'axe central de la fus\u00E9e
|
||||
ringcompcfg.EngineBlock.desc = <html>Un <b>bloc moteur </b> emp\u00EAche le moteur de se d\u00E9placer vers l'avant dans le tube porte moteur.<br><br>Pour ajouter un moteur, cr\u00E9er un <b>tube</b> ou un <b>tube interne</b> et marquer le comme porte moteur dans l'onglet <em>Moteur</em>.
|
||||
ringcompcfg.InnerRadius = Diam\u00E8tre int\u00E9rieur
|
||||
ringcompcfg.Length = Longueur
|
||||
! Ring Component Config
|
||||
|
@ -626,7 +626,6 @@ ringcompcfg.Radialdirection = direzione Radiale:
|
||||
ringcompcfg.radialdirectionfrom = La direzione radiale dall linea centrale del razzo
|
||||
ringcompcfg.but.Reset = Azzera
|
||||
ringcompcfg.but.Resetcomponant = Azzera il componente alla linea centrale del razzo
|
||||
ringcompcfg.EngineBlock.desc = <html>Un <b>blocca motore</b> ferma il motore dal movimento in avanti nel tubo di montaggio del motore.<br><br>Per aggiungere un motore, crea un <b>corpo</b> o un <b>tubo interno</b> e segnalo come tubo di montaggio motore nella scheda <em>Motore</em> .
|
||||
ringcompcfg.note.desc = Nota: Un tubo interno non modifica l'aerodinamica del razzo anche se e' posto all'esterno del corpo.
|
||||
|
||||
|
||||
@ -720,6 +719,9 @@ RocketCompCfg.title.Aftshoulder = Spalla posteriore
|
||||
RocketCompCfg.border.Foreshoulder = Spalla anteriore
|
||||
!RocketCompCfg.lbl.Length = Lunghezza:
|
||||
|
||||
! ComponentInfo
|
||||
ComponentInfo.EngineBlock = Un <b>blocca motore</b> ferma il motore dal movimento in avanti nel tubo di montaggio del motore.<br><br>Per aggiungere un motore, crea un <b>corpo</b> o un <b>tubo interno</b> e segnalo come tubo di montaggio motore nella scheda <em>Motore</em> .
|
||||
|
||||
! BulkheadConfig
|
||||
BulkheadCfg.tab.Diameter = Diametro:
|
||||
BulkheadCfg.tab.Thickness = Spessore:
|
||||
|
@ -656,7 +656,6 @@ ringcompcfg.Radialdirection = \u534A\u5F84\u65B9\u5411\u5411\u304D
|
||||
ringcompcfg.radialdirectionfrom = \u30ED\u30B1\u30C3\u30C8\u30BB\u30F3\u30BF\u30FC\u30E9\u30A4\u30F3\u304B\u3089\u306E\u534A\u5F84\u65B9\u5411\u306E\u5411\u304D
|
||||
ringcompcfg.but.Reset = \u30EA\u30BB\u30C3\u30C8
|
||||
ringcompcfg.but.Resetcomponant = \u90E8\u54C1\u3092\u30ED\u30B1\u30C3\u30C8\u30BB\u30F3\u30BF\u30FC\u30E9\u30A4\u30F3\u306B\u30EA\u30BB\u30C3\u30C8\u3059\u308B
|
||||
ringcompcfg.EngineBlock.desc = <html><b>\u30A8\u30F3\u30B8\u30F3\u30D6\u30ED\u30C3\u30AF</b>\u306F\u30E2\u30FC\u30BF\u30FC\u30DE\u30A6\u30F3\u30C8\u30C1\u30E5\u30FC\u30D6\u306E\u4E2D\u3067\u30E2\u30FC\u30BF\u30FC\u304C\u524D\u306B\u52D5\u304F\u306E\u3092\u6B62\u3081\u308B\u5F79\u5272\u3002<br><br>\u30E2\u30FC\u30BF\u30FC\u3092\u8FFD\u52A0\u3059\u308B\u306B\u306F <b>\u30DC\u30C7\u30A3\u30C1\u30E5\u30FC\u30D6</b>\u3082\u3057\u304F\u306F<b>\u30A4\u30F3\u30CA\u30FC\u30C1\u30E5\u30FC\u30D6</b>\u3092\u4F5C\u3063\u3066 and mark it as a motor mount in the <em>\u30E2\u30FC\u30BF\u30FC</em>\u30BF\u30D6\u3067\u30E2\u30FC\u30BF\u30FC\u30DE\u30A6\u30F3\u30C8\u3068\u3057\u3066\u30C1\u30A7\u30C3\u30AF\u3059\u308B\u3002
|
||||
ringcompcfg.note.desc = \u30E1\u30E2\uFF1A\u30A4\u30F3\u30CA\u30FC\u30C1\u30E5\u30FC\u30D6\u306F\u30DC\u30C7\u30A3\u30C1\u30E5\u30FC\u30D6\u306E\u5916\u5074\u306B\u51FA\u306A\u3044\u9650\u308A\u306F\u7A7A\u529B\u3078\u306E\u5F71\u97FF\u306F\u7121\u3044
|
||||
|
||||
|
||||
@ -750,6 +749,9 @@ RocketCompCfg.title.Aftshoulder = \u5F8C\u65B9\u30B7\u30E7\u30EB\u30C0\u30FC
|
||||
RocketCompCfg.border.Foreshoulder = \u524D\u65B9\u30B7\u30E7\u30EB\u30C0\u30FC
|
||||
!RocketCompCfg.lbl.Length
|
||||
|
||||
! ComponentInfo
|
||||
ComponentInfo.EngineBlock = <b>\u30A8\u30F3\u30B8\u30F3\u30D6\u30ED\u30C3\u30AF</b>\u306F\u30E2\u30FC\u30BF\u30FC\u30DE\u30A6\u30F3\u30C8\u30C1\u30E5\u30FC\u30D6\u306E\u4E2D\u3067\u30E2\u30FC\u30BF\u30FC\u304C\u524D\u306B\u52D5\u304F\u306E\u3092\u6B62\u3081\u308B\u5F79\u5272\u3002<br><br>\u30E2\u30FC\u30BF\u30FC\u3092\u8FFD\u52A0\u3059\u308B\u306B\u306F <b>\u30DC\u30C7\u30A3\u30C1\u30E5\u30FC\u30D6</b>\u3082\u3057\u304F\u306F<b>\u30A4\u30F3\u30CA\u30FC\u30C1\u30E5\u30FC\u30D6</b>\u3092\u4F5C\u3063\u3066 and mark it as a motor mount in the <em>\u30E2\u30FC\u30BF\u30FC</em>\u30BF\u30D6\u3067\u30E2\u30FC\u30BF\u30FC\u30DE\u30A6\u30F3\u30C8\u3068\u3057\u3066\u30C1\u30A7\u30C3\u30AF\u3059\u308B\u3002
|
||||
|
||||
! BulkheadConfig
|
||||
BulkheadCfg.tab.Diameter = \u534A\u5F84\uFF1A
|
||||
BulkheadCfg.tab.Thickness = \u539A\u3055\uFF1A
|
||||
|
@ -751,7 +751,6 @@ ringcompcfg.Radialdirection = Radiale richting:
|
||||
ringcompcfg.radialdirectionfrom = De radiale richting vanaf de middellijn van de raket
|
||||
ringcompcfg.but.Reset = Herstel
|
||||
ringcompcfg.but.Resetcomponant = Zet het onderdeel terug naar de raketmiddellijn
|
||||
ringcompcfg.EngineBlock.desc = <html>Een <b>motorblok</b> voorkomt dat de motor voorwaarts beweegt in de buis van de motorsteun.<br><br>Om een motor toe te voegen, maak een <b>rompbuis</b> of <b>binnenbuis</b> en markeer het als een motorbevestiging in het <em>Motortabblad</em>.
|
||||
ringcompcfg.note.desc = Opmerking: Een binnenbuis heeft geen invloed op de aërodynamica van de raket, zelfs niet als hij buiten de rompbuis is geplaatst.
|
||||
|
||||
|
||||
@ -871,6 +870,9 @@ RocketCompCfg.border.Foreshoulder = Voorschouder
|
||||
RocketCompCfg.lbl.InstanceCount = Aantal instanties
|
||||
RocketCompCfg.lbl.InstanceSeparation = Instantie afscheiding
|
||||
|
||||
! ComponentInfo
|
||||
ComponentInfo.EngineBlock = Een <b>motorblok</b> voorkomt dat de motor voorwaarts beweegt in de buis van de motorsteun.<br><br>Om een motor toe te voegen, maak een <b>rompbuis</b> of <b>binnenbuis</b> en markeer het als een motorbevestiging in het <em>Motortabblad</em>.
|
||||
|
||||
! BulkheadConfig
|
||||
BulkheadCfg.tab.Diameter = Diameter:
|
||||
BulkheadCfg.tab.Thickness = Dikte:
|
||||
|
@ -570,7 +570,6 @@ update.dlg.latestVersion = Korzystasz z najnowszej wersji OpenRocket: %s.
|
||||
ringcompcfg.radialdirectionfrom = Kierunek prostopad\u0142y do osi centralnej rakiety
|
||||
ringcompcfg.but.Reset = Reset
|
||||
ringcompcfg.but.Resetcomponant = Resetuj po\u0142o\u017Cenie cz\u0119\u015Bci wzgl\u0119dem osi rakiety
|
||||
ringcompcfg.EngineBlock.desc = <html><b>Blokada silnika</b> unieruchamia silnik wewn\u0105trz elementu pe\u0142ni\u0105cego funkcj\u0119 gniazda silnikowego.<br><br>Aby doda\u0107 silnik, stwórz najpierw <b>Korpus rakiety</b> lub <b>rur\u0119 wewn\u0119trzn\u0105</b> i oznacz j\u0105 jako gniazdo silnika w zak\u0142adce <em>Silnik</em>.
|
||||
ringcompcfg.note.desc = Uwaga: Rura wewn\u0119trzna nie wp\u0142ywa na aerodynamik\u0119 rakiety, nawet je\u017Celi znajduje si\u0119 poza korpusem.
|
||||
|
||||
|
||||
@ -662,7 +661,11 @@ update.dlg.latestVersion = Korzystasz z najnowszej wersji OpenRocket: %s.
|
||||
RocketCompCfg.title.Noseconeshoulder = Wpust g\u0142owicy
|
||||
RocketCompCfg.title.Aftshoulder = Wpust tylny
|
||||
RocketCompCfg.border.Foreshoulder = Wpust przedni
|
||||
!RocketCompCfg.lbl.Length
|
||||
!RocketCompCfg.lbl.Length
|
||||
|
||||
! ComponentInfo
|
||||
ComponentInfo.EngineBlock = <b>Blokada silnika</b> unieruchamia silnik wewn\u0105trz elementu pe\u0142ni\u0105cego funkcj\u0119 gniazda silnikowego.<br><br>Aby doda\u0107 silnik, stwórz najpierw <b>Korpus rakiety</b> lub <b>rur\u0119 wewn\u0119trzn\u0105</b> i oznacz j\u0105 jako gniazdo silnika w zak\u0142adce <em>Silnik</em>.
|
||||
|
||||
|
||||
! BulkheadConfig
|
||||
BulkheadCfg.tab.Diameter = \u015Arednica:
|
||||
|
@ -844,6 +844,9 @@ RocketCompCfg.title.Noseconeshoulder = Ressalto da ogiva
|
||||
RocketCompCfg.ttip.Endcapped = Quando a extremidade do ressalto \u00e9 limitada.
|
||||
RocketCompCfg.lbl.Componentname.ttip = Nome do componente.
|
||||
|
||||
! ComponentInfo
|
||||
ComponentInfo.EngineBlock = Um <b>bloco do motor</b> p\u00e1ra o motor de se mover para a frente no tubo de montagem do motor.<br><br>Para adicionar um motor, criar um <b>tubo de corpo</b> ou <b>tubo interno</b> e marc\u00e1-lo como uma montagem do motor na aba <em>Motor</em>.
|
||||
|
||||
RocketComponent.Position.ABSOLUTE = Dica da ogiva
|
||||
RocketComponent.Position.AFTER = Depois do componente pai
|
||||
RocketComponent.Position.BOTTOM = Parte do componente pai
|
||||
@ -1650,7 +1653,6 @@ update.dlg.latestVersion = Voc\u00ea est\u00e1 executando a vers\u00e3o mais rec
|
||||
|
||||
ringcompcfg.Automatic = Autom\u00e1tico
|
||||
ringcompcfg.Distancefrom = Dist\u00e2ncia a partir da linha de centro do foguete
|
||||
ringcompcfg.EngineBlock.desc = <html>Um <b>bloco do motor</b> p\u00e1ra o motor de se mover para a frente no tubo de montagem do motor.<br><br>Para adicionar um motor, criar um <b>tubo de corpo</b> ou <b>tubo interno</b> e marc\u00e1-lo como uma montagem do motor na aba <em>Motor</em>.
|
||||
ringcompcfg.InnerRadius = Raio interno
|
||||
ringcompcfg.Length = Comprimento
|
||||
# Ring Component Config
|
||||
|
@ -804,7 +804,6 @@ ringcompcfg.Radialdirection = \u0420\u0430\u0434\u0438\u0430\u043B\u044C\u043D\u
|
||||
ringcompcfg.radialdirectionfrom = \u0420\u0430\u0434\u0438\u0430\u043B\u044C\u043D\u043E\u0435 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u043E\u0442 \u043E\u0441\u0438 \u0440\u0430\u043A\u0435\u0442\u044B
|
||||
ringcompcfg.but.Reset = \u0421\u0431\u0440\u043E\u0441
|
||||
ringcompcfg.but.Resetcomponant = \u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442 \u043D\u0430 \u043E\u0441\u0438 \u0440\u0430\u043A\u0435\u0442\u044B
|
||||
ringcompcfg.EngineBlock.desc = <html><b>\u0423\u043F\u043E\u0440 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043B\u044F</b> \u043F\u0440\u0435\u043F\u044F\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0432\u0438\u0436\u0435\u043D\u0438\u044E \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043B\u044F \u0432\u043F\u0435\u0440\u0435\u0434 \u0432 \u0442\u0440\u0443\u0431\u0435.<br><br>\u0414\u043B\u044F \u0442\u043E\u0433\u043E \u0447\u0442\u043E\u0431\u044B \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043B\u044C, \u0441\u043E\u0437\u0434\u0430\u0439\u0442\u0435 <b>\u041A\u043E\u0440\u043F\u0443\u0441\u043D\u0443\u044E \u0442\u0440\u0443\u0431\u0443</b> \u0438\u043B\u0438 <b>\u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044E\u044E \u0442\u0440\u0443\u0431\u0443</b> \u0438 \u043E\u0442\u043C\u0435\u0442\u044C\u0442\u0435 \u044D\u0442\u043E\u0442 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u043A\u0430\u043A \u043A\u0440\u0435\u043F\u0435\u0436 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043B\u044F \u043D\u0430 \u0432\u043A\u043B\u0430\u0434\u043A\u0435 <em>\u0414\u0432\u0438\u0433\u0430\u0442\u0435\u043B\u044C</em> .
|
||||
ringcompcfg.note.desc = \u041F\u0440\u0438\u043C\u0435\u0447\u0430\u043D\u0438\u0435: \u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044F\u044F \u0442\u0440\u0443\u0431\u0430 \u043D\u0435 \u0432\u043B\u0438\u044F\u0435\u0442 \u043D\u0430 \u0430\u044D\u0440\u043E\u0434\u0438\u043D\u0430\u043C\u0438\u043A\u0443, \u0434\u0430\u0436\u0435 \u0431\u0443\u0434\u0443\u0447\u0438 \u0440\u0430\u0437\u043C\u0435\u0449\u0435\u043D\u043D\u043E\u0439 \u0437\u0430 \u043F\u0440\u0435\u0434\u0435\u043B\u0430\u043C\u0438 \u043A\u043E\u0440\u043F\u0443\u0441\u0430.
|
||||
|
||||
|
||||
@ -949,6 +948,9 @@ RocketCompCfg.tab.Inside = \u0412\u043D\u0443\u0442\u0440\u0438
|
||||
RocketCompCfg.tab.RightSide = \u0421\u043F\u0440\u0430\u0432\u0430
|
||||
RocketCompCfg.tab.LeftSide = \u0421\u043B\u0435\u0432\u0430
|
||||
|
||||
! ComponentInfo
|
||||
ComponentInfo.EngineBlock = <b>\u0423\u043F\u043E\u0440 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043B\u044F</b> \u043F\u0440\u0435\u043F\u044F\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u0432\u0438\u0436\u0435\u043D\u0438\u044E \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043B\u044F \u0432\u043F\u0435\u0440\u0435\u0434 \u0432 \u0442\u0440\u0443\u0431\u0435.<br><br>\u0414\u043B\u044F \u0442\u043E\u0433\u043E \u0447\u0442\u043E\u0431\u044B \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043B\u044C, \u0441\u043E\u0437\u0434\u0430\u0439\u0442\u0435 <b>\u041A\u043E\u0440\u043F\u0443\u0441\u043D\u0443\u044E \u0442\u0440\u0443\u0431\u0443</b> \u0438\u043B\u0438 <b>\u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044E\u044E \u0442\u0440\u0443\u0431\u0443</b> \u0438 \u043E\u0442\u043C\u0435\u0442\u044C\u0442\u0435 \u044D\u0442\u043E\u0442 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u043A\u0430\u043A \u043A\u0440\u0435\u043F\u0435\u0436 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043B\u044F \u043D\u0430 \u0432\u043A\u043B\u0430\u0434\u043A\u0435 <em>\u0414\u0432\u0438\u0433\u0430\u0442\u0435\u043B\u044C</em> .
|
||||
|
||||
! BulkheadConfig
|
||||
BulkheadCfg.tab.Diameter = \u0414\u0438\u0430\u043C\u0435\u0442\u0440:
|
||||
BulkheadCfg.tab.Thickness = \u0422\u043E\u043B\u0449\u0438\u043D\u0430:
|
||||
|
@ -703,7 +703,6 @@ ringcompcfg.Radialdirection = Radial direction:
|
||||
ringcompcfg.radialdirectionfrom = The radial direction from the rocket centerline
|
||||
ringcompcfg.but.Reset = Reset
|
||||
ringcompcfg.but.Resetcomponant = Reset the component to the rocket centerline
|
||||
ringcompcfg.EngineBlock.desc = <html>An <b>engine block</b> stops the motor from moving forwards in the motor mount tube.<br><br>In order to add a motor, create a <b>body tube</b> or <b>inner tube</b> and mark it as a motor mount in the <em>Motor</em> tab.
|
||||
ringcompcfg.note.desc = Note: An inner tube will not affect the aerodynamics of the rocket even if it is located outside of the body tube.
|
||||
|
||||
|
||||
@ -822,6 +821,9 @@ RocketCompCfg.title.Aftshoulder = Aft shoulder
|
||||
RocketCompCfg.border.Foreshoulder = Fore shoulder
|
||||
!RocketCompCfg.lbl.Length = Length:
|
||||
|
||||
! ComponentInfo
|
||||
ComponentInfo.EngineBlock = An <b>engine block</b> stops the motor from moving forwards in the motor mount tube.<br><br>In order to add a motor, create a <b>body tube</b> or <b>inner tube</b> and mark it as a motor mount in the <em>Motor</em> tab.
|
||||
|
||||
! BulkheadConfig
|
||||
BulkheadCfg.tab.Diameter = Diameter:
|
||||
BulkheadCfg.tab.Thickness = Thickness:
|
||||
|
@ -933,6 +933,9 @@ RocketCompCfg.title.Noseconeshoulder = \u5934\u9525\u8FDE\u63A5\u59
|
||||
RocketCompCfg.ttip.Endcapped = \u8FDE\u63A5\u5904\u7EC8\u7AEF\u662F\u5426\u6709\u76D6.
|
||||
RocketCompCfg.lbl.Componentname.ttip = \u7EC4\u4EF6\u540D\u79F0.
|
||||
|
||||
! ComponentInfo
|
||||
ComponentInfo.EngineBlock = <b>\u53D1\u52A8\u673A\u5EA7</b>\u7528\u4E8E\u9632\u6B62\u53D1\u52A8\u673A\u5411\u524D\u7A9C\u51FA\u7BAD\u4F53.<br><br>\u6DFB\u52A0\u53D1\u52A8\u673A\u524D\u8BF7\u5148\u6DFB\u52A0<b>\u7BAD\u4F53</b>\u6216<b>\u5185\u7BA1</b>\u5E76\u5728<em>\u53D1\u52A8\u673A</em>\u9875\u9762\u4E0A\u6807\u8BB0\u4E3A\u53D1\u52A8\u673A\u5EA7.
|
||||
|
||||
RocketComponent.Position.ABSOLUTE = \u5934\u9525\u5C16\u7AEF
|
||||
RocketComponent.Position.AFTER = \u7236\u7EC4\u4EF6\u4E4B\u540E
|
||||
RocketComponent.Position.BOTTOM = \u7236\u7EC4\u4EF6\u5E95\u90E8
|
||||
@ -1787,7 +1790,6 @@ update.dlg.latestVersion = \u60A8\u4F7F\u7528\u7684\u5DF2\u7ECF\u662FOpenRocket\
|
||||
|
||||
ringcompcfg.Automatic = \u81EA\u52A8
|
||||
ringcompcfg.Distancefrom = \u5230\u706B\u7BAD\u4E2D\u5FC3\u7EBF\u7684\u8DDD\u79BB
|
||||
ringcompcfg.EngineBlock.desc = <html><b>\u53D1\u52A8\u673A\u5EA7</b>\u7528\u4E8E\u9632\u6B62\u53D1\u52A8\u673A\u5411\u524D\u7A9C\u51FA\u7BAD\u4F53.<br><br>\u6DFB\u52A0\u53D1\u52A8\u673A\u524D\u8BF7\u5148\u6DFB\u52A0<b>\u7BAD\u4F53</b>\u6216<b>\u5185\u7BA1</b>\u5E76\u5728<em>\u53D1\u52A8\u673A</em>\u9875\u9762\u4E0A\u6807\u8BB0\u4E3A\u53D1\u52A8\u673A\u5EA7.
|
||||
ringcompcfg.InnerRadius = \u5185\u76F4\u5F84
|
||||
ringcompcfg.Length = \u957F\u5EA6
|
||||
! Ring Component Config
|
||||
|
@ -78,8 +78,16 @@ public class ClassBasedTranslator implements Translator {
|
||||
public String getBaseText(String base, String translation) {
|
||||
return translator.getBaseText(base, translation);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checkIfKeyExists(String key) {
|
||||
try {
|
||||
get(key);
|
||||
return true;
|
||||
} catch (MissingResourceException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private String findClassName() {
|
||||
Throwable trace = new Throwable();
|
||||
|
@ -1,5 +1,7 @@
|
||||
package net.sf.openrocket.l10n;
|
||||
|
||||
import java.util.MissingResourceException;
|
||||
|
||||
/**
|
||||
* A translator implementation that returns the logical key in brackets instead
|
||||
* of an actual translation. The class optionally verifies that the translation
|
||||
@ -47,6 +49,15 @@ public class DebugTranslator implements Translator {
|
||||
}
|
||||
return translation;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checkIfKeyExists(String key) {
|
||||
try {
|
||||
translator.get(key);
|
||||
return true;
|
||||
} catch (MissingResourceException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -52,7 +52,16 @@ public class ExceptionSuppressingTranslator implements Translator {
|
||||
public String getBaseText(String base, String translation) {
|
||||
return translator.getBaseText(base, translation);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checkIfKeyExists(String key) {
|
||||
try {
|
||||
translator.get(key);
|
||||
return true;
|
||||
} catch (MissingResourceException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static synchronized void handleError(String key, MissingResourceException e) {
|
||||
if (!errorReported) {
|
||||
|
@ -66,4 +66,14 @@ public class ResourceBundleTranslator implements Translator {
|
||||
}
|
||||
return translation;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkIfKeyExists(String key) {
|
||||
try {
|
||||
get(key);
|
||||
return true;
|
||||
} catch (MissingResourceException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -50,5 +50,12 @@ public interface Translator {
|
||||
* @return the base text, or the translation if not found.
|
||||
*/
|
||||
public String getBaseText(String base, String translation);
|
||||
|
||||
/**
|
||||
* Checks whether a certain translation key exists.
|
||||
* @param key the key to check
|
||||
* @return true if it exists, false otherwise
|
||||
*/
|
||||
public boolean checkIfKeyExists(String key);
|
||||
|
||||
}
|
||||
|
@ -58,7 +58,17 @@ public class DescriptionArea extends JScrollPane {
|
||||
public DescriptionArea(String text, int rows, float size) {
|
||||
this(text, rows, size, true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Construct an opaque description area with the specified number of rows, size and text, being opaque.
|
||||
*
|
||||
* @param text the initial text.
|
||||
* @param rows the number of rows.
|
||||
*/
|
||||
public DescriptionArea(String text, int rows) {
|
||||
this(text, rows, -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor with all options.
|
||||
*
|
||||
|
@ -436,6 +436,8 @@ public class AppearancePanel extends JPanel {
|
||||
remove(outsideInsidePane);
|
||||
add(outsidePanel, "span 4, growx, wrap");
|
||||
}
|
||||
|
||||
// Repaint to fit to the new size
|
||||
if (parent != null) {
|
||||
parent.pack();
|
||||
} else {
|
||||
|
@ -11,15 +11,12 @@ import javax.swing.JSpinner;
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import net.sf.openrocket.document.OpenRocketDocument;
|
||||
import net.sf.openrocket.gui.SpinnerEditor;
|
||||
import net.sf.openrocket.gui.adaptors.CustomFocusTraversalPolicy;
|
||||
import net.sf.openrocket.gui.adaptors.DoubleModel;
|
||||
import net.sf.openrocket.gui.adaptors.EnumModel;
|
||||
import net.sf.openrocket.gui.components.BasicSlider;
|
||||
import net.sf.openrocket.gui.components.DescriptionArea;
|
||||
import net.sf.openrocket.gui.components.UnitSelector;
|
||||
import net.sf.openrocket.l10n.Translator;
|
||||
import net.sf.openrocket.material.Material;
|
||||
import net.sf.openrocket.rocketcomponent.EngineBlock;
|
||||
import net.sf.openrocket.rocketcomponent.RocketComponent;
|
||||
import net.sf.openrocket.rocketcomponent.ThicknessRingComponent;
|
||||
import net.sf.openrocket.rocketcomponent.position.AxialMethod;
|
||||
@ -168,13 +165,6 @@ public class RingComponentConfig extends RocketComponentConfig {
|
||||
|
||||
//// Material
|
||||
MaterialPanel materialPanel = new MaterialPanel(component, document, Material.Type.BULK, order);
|
||||
|
||||
if (component instanceof EngineBlock) {
|
||||
final DescriptionArea desc = new DescriptionArea(6);
|
||||
//// <html>An <b>engine block</b> stops the motor from moving forwards in the motor mount tube.<br><br>In order to add a motor, create a <b>body tube</b> or <b>inner tube</b> and mark it as a motor mount in the <em>Motor</em> tab.
|
||||
desc.setText(trans.get("ringcompcfg.EngineBlock.desc"));
|
||||
materialPanel.add(desc, "width 1px, growx, wrap");
|
||||
}
|
||||
panel.add(materialPanel, "cell 4 0, gapleft paragraph, aligny 0%, spany");
|
||||
|
||||
return panel;
|
||||
|
@ -36,11 +36,14 @@ import net.sf.openrocket.gui.adaptors.DoubleModel;
|
||||
import net.sf.openrocket.gui.adaptors.IntegerModel;
|
||||
import net.sf.openrocket.gui.adaptors.PresetModel;
|
||||
import net.sf.openrocket.gui.components.BasicSlider;
|
||||
import net.sf.openrocket.gui.components.DescriptionArea;
|
||||
import net.sf.openrocket.gui.components.StyledLabel;
|
||||
import net.sf.openrocket.gui.components.StyledLabel.Style;
|
||||
import net.sf.openrocket.gui.components.UnitSelector;
|
||||
import net.sf.openrocket.gui.dialogs.preset.ComponentPresetChooserDialog;
|
||||
import net.sf.openrocket.gui.util.GUIUtil;
|
||||
import net.sf.openrocket.gui.util.Icons;
|
||||
import net.sf.openrocket.gui.widgets.IconToggleButton;
|
||||
import net.sf.openrocket.gui.widgets.SelectColorButton;
|
||||
import net.sf.openrocket.l10n.Translator;
|
||||
import net.sf.openrocket.preset.ComponentPreset;
|
||||
@ -82,7 +85,7 @@ public class RocketComponentConfig extends JPanel {
|
||||
private boolean allMassive; // Checks whether all listener components, and this component, are massive
|
||||
|
||||
public RocketComponentConfig(OpenRocketDocument document, RocketComponent component, JDialog parent) {
|
||||
setLayout(new MigLayout("fill, gap 4!, ins panel", "[]:5[]", "[growprio 5]5![fill, grow, growprio 500]5![growprio 5]"));
|
||||
setLayout(new MigLayout("fill, gap 4!, ins panel, hidemode 3", "[]:5[]", "[growprio 5]5![fill, grow, growprio 500]5![growprio 5]"));
|
||||
|
||||
this.document = document;
|
||||
this.component = component;
|
||||
@ -169,18 +172,62 @@ public class RocketComponentConfig extends JPanel {
|
||||
|
||||
updateFields();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add a section to the component configuration dialog that displays information about the component.
|
||||
*/
|
||||
private void addComponentInfo(JPanel buttonPanel) {
|
||||
final String helpText;
|
||||
final String key = "ComponentInfo." + component.getClass().getSimpleName();
|
||||
if (!trans.checkIfKeyExists(key)) {
|
||||
return;
|
||||
}
|
||||
helpText = "<html>" + trans.get(key) + "</html>";
|
||||
|
||||
// Component info
|
||||
DescriptionArea description = new DescriptionArea(helpText, 5);
|
||||
description.setTextFont(null);
|
||||
description.setVisible(false);
|
||||
this.add(description, "gapleft 10, gapright 10, growx, spanx, wrap");
|
||||
|
||||
// Component info toggle button
|
||||
IconToggleButton infoBtn = new IconToggleButton();
|
||||
infoBtn.setToolTipText(trans.get("RocketCompCfg.btn.ComponentInfo.ttip"));
|
||||
infoBtn.setIconScale(1.2f);
|
||||
infoBtn.setSelectedIcon(Icons.HELP_ABOUT);
|
||||
buttonPanel.add(infoBtn, "split 3, gapright para");
|
||||
|
||||
infoBtn.addItemListener(new ItemListener() {
|
||||
@Override
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
// Note: we will display the help text if the infoButton is not selected, and hide it if it is selected.
|
||||
// This way, the info button is displayed as "enabled" to draw attention to it.
|
||||
description.setVisible(e.getStateChange() != ItemEvent.SELECTED);
|
||||
|
||||
// Repaint to fit to the new size
|
||||
if (parent != null) {
|
||||
parent.pack();
|
||||
} else {
|
||||
updateUI();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
infoBtn.setSelected(true);
|
||||
}
|
||||
|
||||
protected void addButtons(JButton... buttons) {
|
||||
if (buttonPanel != null) {
|
||||
this.remove(buttonPanel);
|
||||
}
|
||||
|
||||
buttonPanel = new JPanel(new MigLayout("fillx, ins 5"));
|
||||
buttonPanel = new JPanel(new MigLayout("fill, ins 5, hidemode 3"));
|
||||
|
||||
//// Component info
|
||||
addComponentInfo(buttonPanel);
|
||||
|
||||
//// Multi-comp edit label
|
||||
multiCompEditLabel = new StyledLabel(" ", -1, Style.BOLD);
|
||||
//multiCompEditLabel.setFontColor(new Color(0, 0, 239));
|
||||
multiCompEditLabel.setFontColor(new Color(170, 0, 100));
|
||||
buttonPanel.add(multiCompEditLabel, "split 2");
|
||||
|
||||
|
@ -35,7 +35,7 @@ public class RocketConfig extends RocketComponentConfig {
|
||||
rocket = (Rocket) c;
|
||||
|
||||
this.removeAll();
|
||||
setLayout(new MigLayout("fill"));
|
||||
setLayout(new MigLayout("fill, hideMode 3"));
|
||||
|
||||
//// Design name:
|
||||
this.add(new JLabel(trans.get("RocketCfg.lbl.Designname")), "top, pad 4lp, gapright 10lp");
|
||||
|
@ -25,7 +25,6 @@ import net.sf.openrocket.gui.components.StyledLabel;
|
||||
import net.sf.openrocket.gui.configdialog.ComponentConfigDialog;
|
||||
import net.sf.openrocket.gui.dialogs.ScaleDialog;
|
||||
import net.sf.openrocket.gui.util.Icons;
|
||||
import net.sf.openrocket.gui.widgets.IconButton;
|
||||
import net.sf.openrocket.l10n.Translator;
|
||||
import net.sf.openrocket.logging.Markers;
|
||||
import net.sf.openrocket.rocketcomponent.ComponentChangeEvent;
|
||||
|
119
swing/src/net/sf/openrocket/gui/widgets/IconToggleButton.java
Normal file
119
swing/src/net/sf/openrocket/gui/widgets/IconToggleButton.java
Normal file
@ -0,0 +1,119 @@
|
||||
package net.sf.openrocket.gui.widgets;
|
||||
|
||||
import net.sf.openrocket.gui.util.Icons;
|
||||
|
||||
import javax.swing.Action;
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.UIManager;
|
||||
import java.awt.Insets;
|
||||
|
||||
/**
|
||||
* Toggle button specifically for displaying an icon.
|
||||
* The button does not have any borders and only displays the icon.
|
||||
* When setting the selected icon, the button will automatically generate a version of that icon
|
||||
* for the unselected state (a greyed out version).
|
||||
* You can also set the scale of the icon using the ICON_SCALE variable.
|
||||
*
|
||||
* @author Sibo Van Gool <sibo.vangool@hotmail.com>
|
||||
*/
|
||||
public class IconToggleButton extends SelectColorToggleButton {
|
||||
private double ICON_SCALE = 1;
|
||||
|
||||
public IconToggleButton(Action a) {
|
||||
super(a);
|
||||
initSettings();
|
||||
}
|
||||
|
||||
public IconToggleButton(String text) {
|
||||
super(text);
|
||||
initSettings();
|
||||
}
|
||||
|
||||
public IconToggleButton() {
|
||||
initSettings();
|
||||
}
|
||||
|
||||
public IconToggleButton(Icon icon) {
|
||||
super(icon);
|
||||
initSettings();
|
||||
}
|
||||
|
||||
public IconToggleButton(Icon icon, boolean selected) {
|
||||
super(icon, selected);
|
||||
initSettings();
|
||||
}
|
||||
|
||||
public IconToggleButton(String text, boolean selected) {
|
||||
super(text, selected);
|
||||
initSettings();
|
||||
}
|
||||
|
||||
public IconToggleButton(String text, Icon icon) {
|
||||
super(text, icon);
|
||||
initSettings();
|
||||
}
|
||||
|
||||
public IconToggleButton(String text, Icon icon, boolean selected) {
|
||||
super(text, icon, selected);
|
||||
initSettings();
|
||||
}
|
||||
|
||||
public void setIconScale(double iconScale) {
|
||||
ICON_SCALE = iconScale;
|
||||
}
|
||||
|
||||
private void initSettings() {
|
||||
setBorderPainted(false);
|
||||
setBorder(null);
|
||||
setFocusable(false);
|
||||
setMargin(new Insets(0, 0, 0, 0));
|
||||
setContentAreaFilled(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSelectedIcon(Icon selectedIcon) {
|
||||
super.setSelectedIcon(selectedIcon);
|
||||
setUnselectedIcon(selectedIcon);
|
||||
// There is a bug where the normal override of the pressed icon does not work, so we have to assign it here.
|
||||
setPressedIcon(Icons.getScaledIcon(selectedIcon, ICON_SCALE));
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates and sets an unselected icon based on the current icon.
|
||||
* @param icon the icon of the button when it is selected
|
||||
*/
|
||||
private void setUnselectedIcon(Icon icon) {
|
||||
Icon unselectedIcon = UIManager.getLookAndFeel().getDisabledIcon(null, icon);
|
||||
setIcon(unselectedIcon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getIcon() {
|
||||
return Icons.getScaledIcon(super.getIcon(), ICON_SCALE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getSelectedIcon() {
|
||||
return Icons.getScaledIcon(super.getSelectedIcon(), ICON_SCALE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getDisabledIcon() {
|
||||
return Icons.getScaledIcon(super.getDisabledIcon(), ICON_SCALE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getDisabledSelectedIcon() {
|
||||
return Icons.getScaledIcon(super.getDisabledSelectedIcon(), ICON_SCALE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getRolloverIcon() {
|
||||
return Icons.getScaledIcon(super.getRolloverIcon(), ICON_SCALE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getRolloverSelectedIcon() {
|
||||
return Icons.getScaledIcon(super.getRolloverSelectedIcon(), ICON_SCALE);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user