Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.demcha.compose.engine.components.content;

import com.demcha.compose.engine.components.core.Component;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
Expand All @@ -12,7 +11,7 @@
@Getter
@ToString(exclude = "bytes")
@EqualsAndHashCode(of = "fingerprint")
public final class ImageData implements Component {
public final class ImageData {
private final byte[] bytes;
private final String sourceKey;
private final String fingerprint;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.demcha.compose.engine.components.content;

import com.demcha.compose.engine.components.core.Component;

public record ImageIntrinsicSize(double width, double height) implements Component {
public record ImageIntrinsicSize(double width, double height) {
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.demcha.compose.engine.components.content.barcode;

import com.demcha.compose.engine.components.core.Component;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
Expand All @@ -19,7 +18,7 @@
@Getter
@ToString
@EqualsAndHashCode
public final class BarcodeData implements Component {
public final class BarcodeData {

private final String content;
private final BarcodeType type;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.demcha.compose.engine.components.content.header_footer;

import com.demcha.compose.engine.components.core.Component;
import com.demcha.compose.engine.components.content.text.TextStyle;
import lombok.Builder;
import lombok.Getter;
Expand All @@ -25,7 +24,7 @@
*/
@Getter
@Builder
public final class HeaderFooterConfig implements Component {
public final class HeaderFooterConfig {

/** Whether this is a HEADER or FOOTER zone. */
private final HeaderFooterZone zone;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.demcha.compose.engine.components.content.metadata;

import com.demcha.compose.engine.components.core.Component;
import lombok.Builder;
import lombok.Getter;

Expand All @@ -14,7 +13,7 @@
*/
@Getter
@Builder
public final class DocumentMetadata implements Component {
public final class DocumentMetadata {

/** Document title shown in the PDF viewer title bar and search results. */
private final String title;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.demcha.compose.engine.components.content.protection;

import com.demcha.compose.engine.components.core.Component;
import lombok.Builder;
import lombok.Getter;

Expand All @@ -15,7 +14,7 @@
*/
@Getter
@Builder
public final class PdfProtectionConfig implements Component {
public final class PdfProtectionConfig {

/** Password required to open the document (null = no user password). */
private final String userPassword;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package com.demcha.compose.engine.components.content.shape;

import com.demcha.compose.engine.components.core.Component;

import java.awt.*;

public record Stroke(StrokeColor strokeColor, double width) implements Component {
public record Stroke(StrokeColor strokeColor, double width) {
public static final double DEFAULT_WIDTH = 2.0;

public Stroke(Color color) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package com.demcha.compose.engine.components.content.text;

import com.demcha.compose.engine.components.content.text.LineTextData;
import com.demcha.compose.engine.components.core.Component;

import java.util.List;

/**
* Immutable block-text payload consisting of positioned/measured lines plus
* the block's inter-line spacing contract.
*/
public record BlockTextData(List<LineTextData> lines, float lineSpacing) implements Component {
public record BlockTextData(List<LineTextData> lines, float lineSpacing) {
public static final BlockTextData EMPTY = new BlockTextData(List.of(), 0);

public static BlockTextData empty() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package com.demcha.compose.engine.components.content.text;

import com.demcha.compose.engine.components.core.Component;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public record Text(String value) implements Component {
public record Text(String value) {
public static final Text EMPTY = new Text("");

public Text(String value) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package com.demcha.compose.engine.components.content.text;

import com.demcha.compose.font.FontName;
import com.demcha.compose.engine.components.core.Component;
import lombok.Builder;

import java.awt.*;

@Builder
public record TextStyle(FontName fontName, double size, TextDecoration decoration, Color color) implements Component {
public record TextStyle(FontName fontName, double size, TextDecoration decoration, Color color) {
public static TextStyle DEFAULT_STYLE = new TextStyle(FontName.HELVETICA, 14, TextDecoration.DEFAULT, Color.BLACK);
}

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.demcha.compose.engine.components.content.watermark;

import com.demcha.compose.engine.components.core.Component;
import lombok.Builder;
import lombok.Getter;

Expand All @@ -22,7 +21,7 @@
*/
@Getter
@Builder
public final class WatermarkConfig implements Component {
public final class WatermarkConfig {

// ---- Text watermark fields ----
/** The text to render as a watermark (null if image-based). */
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.demcha.compose.engine.components.geometry;

import com.demcha.compose.engine.components.core.Component;

/**
* Declared content box size for an entity.
Expand All @@ -10,5 +9,5 @@
* margin and padding to derive outer-box size and final placement.
* </p>
*/
public record ContentSize(double width, double height) implements Component {
public record ContentSize(double width, double height) {
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package com.demcha.compose.engine.components.layout;

import com.demcha.compose.engine.components.core.Component;

/**
* Horizontal + vertical placement anchor — a plain value pairing an
* {@link HAnchor} and a {@link VAnchor}. Consumers read {@code h()} / {@code v()}
* and the static factories to describe how content aligns within its area.
*/
public record Anchor(HAnchor h, VAnchor v) implements Component {
public record Anchor(HAnchor h, VAnchor v) {
public static Anchor topLeft() {
return new Anchor(HAnchor.LEFT, VAnchor.TOP);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package com.demcha.compose.engine.components.style;

import com.demcha.compose.engine.components.core.Component;

import java.awt.*;

public record ComponentColor(Color color) implements Component {
public record ComponentColor(Color color) {
// --- Grayscale ---
public static final Color BLACK = new Color(0, 0, 0);
public static final Color DARK_GRAY = new Color(64, 64, 64);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.demcha.compose.engine.components.style;


import com.demcha.compose.engine.components.core.Component;

public record Margin(double top, double right, double bottom, double left) implements Component {
public record Margin(double top, double right, double bottom, double left) {

public static Margin of(double value) {
return new Margin(value, value, value, value);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package com.demcha.compose.engine.components.style;


import com.demcha.compose.engine.components.core.Component;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public record Padding(double top, double right, double bottom, double left) implements Component {
public record Padding(double top, double right, double bottom, double left) {
public static Padding zero() {
log.debug("Getting zero padding");
return new Padding(0.0, 0.0, 0.0, 0.0);
Expand Down

This file was deleted.

Loading